This directory contains scripts for exporting the ThemisDB Compendium documentation to various formats.
Exports the compendium to a single PDF file using Pandoc.
Requirements:
- pandoc
- pdflatex (texlive-latex-base, texlive-latex-extra on Linux)
- Optional: ghostscript (for PDF optimization)
Installation:
# Ubuntu/Debian
sudo apt-get install pandoc texlive-latex-base texlive-latex-extra ghostscript
# macOS
brew install pandoc basictex ghostscript
# Windows
# Download pandoc from https://pandoc.org/installing.html
# Download MiKTeX from https://miktex.org/downloadUsage:
./scripts/export_compendium_pdf.shOutput: ThemisDB-Compendium.pdf in repository root
Features:
- Automatic table of contents with 3 levels
- Numbered sections
- Syntax-highlighted AQL code blocks
- A4 page size with 2.5cm margins
- PDF optimization with Ghostscript (if available)
Exports the compendium to Microsoft Word DOCX format using Pandoc.
Requirements:
- pandoc
Installation:
# Ubuntu/Debian
sudo apt-get install pandoc
# macOS
brew install pandoc
# Windows
# Download from https://pandoc.org/installing.htmlUsage:
./scripts/export_compendium_docx.shOutput: ThemisDB-Compendium.docx in repository root
Features:
- Automatic table of contents
- Numbered sections
- Syntax-highlighted code blocks
- Preserves tables, lists, and formatting
- Editable in Microsoft Word, LibreOffice, or Google Docs
Convenience script that exports to both PDF and DOCX formats.
Usage:
./scripts/export_compendium_all.shOutput: Both ThemisDB-Compendium.pdf and ThemisDB-Compendium.docx in repository root
The export scripts process chapters in the following order:
- Preface
- Index/Introduction
- Chapter 01: Introduction
- Chapter 02: Architecture
- Chapter 02.5: MVCC Timeline
- Chapter 03: Multi-Model
- Chapter 04: Installation
- Chapter 05: Relational
- Chapter 06: Graph
- Chapter 07: Document
- Chapter 08: Vector
- Chapter 09: Timeseries
- Chapter 10: Enterprise
- Chapter 11: Realtime
- Chapter 12: Computer Vision
- Chapter 13: Fulltext
- Chapter 14: Geospatial
- Chapter 15: Analytics
- Chapter 16: Machine Learning
- Chapter 18: Monitoring
- Chapter 19: Backup
- Chapter 20: Performance
- Chapter 21: Clients
Edit export_compendium_pdf.sh and modify the pandoc options:
--variable geometry:margin=2.5cm # Page margins
--variable fontsize=11pt # Font size
--variable papersize=a4 # Paper size (a4, letter, etc.)
--toc-depth=3 # TOC depth (1-6)To use a custom Word template:
- Create a reference document with your desired styles
- Modify
export_compendium_docx.sh:
pandoc "${EXISTING_FILES[@]}" \
--reference-doc=path/to/reference.docx \
...Install pandoc following the instructions above.
For PDF export, you need a LaTeX distribution:
- Linux:
sudo apt-get install texlive-latex-base texlive-latex-extra - macOS:
brew install basictexthen runsudo tlmgr update --self && sudo tlmgr install collection-latexextra - Windows: Install MiKTeX from https://miktex.org/
These warnings are normal and can be ignored. The PDF will be generated successfully.
- For PDF: Ensure ghostscript is installed for automatic optimization
- For DOCX: Word files are typically smaller than PDFs
The scripts use the tango highlighting style. To change it, modify --highlight-style=:
- Available styles:
pygments,tango,espresso,zenburn,kate,monochrome,breezedark,haddock
These scripts can be integrated into GitHub Actions or other CI/CD pipelines:
- name: Install Pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc texlive-latex-base texlive-latex-extra ghostscript
- name: Export Documentation
run: |
./scripts/export_compendium_all.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: documentation-exports
path: |
ThemisDB-Compendium.pdf
ThemisDB-Compendium.docx- The exports include all chapters that have been converted to AQL syntax
- Code blocks tagged with
aqlare properly syntax-highlighted - Cross-references and internal links are preserved
- The generated files are placed in the repository root directory
- Existing files with the same name will be overwritten
For issues or questions about the export scripts, please open an issue on GitHub.