Installation¶
vexy-paraltext is a Python package with a command-line tool. Text extraction depends on a few external programs that you install separately.
Prerequisites¶
- Python 3.12 or newer.
- uv (recommended) or pip.
- For PDFs with a text layer:
markit, an npm package. Requires Node.js. - For EPUBs: the
epub2md.pyscript (see EPUB converter). - For DjVu:
djvulibre(djvutxtandddjvu). - For scanned PDFs and image-only EPUBs:
docling(optional, slow). - For embedding: at least one GGUF embedding model on disk (see Embedding models).
Install the package¶
From PyPI, as a standalone tool:
Or with pip into an existing environment:
From a source checkout, for development:
git clone https://github.com/vexyart/vexy-paraltext.git
cd vexy-paraltext
uv sync
uv run vexy-paraltext run --help
The package depends on uubed[inference], which runs the embedding models, and on llama-cpp-python. On Apple Silicon, llama.cpp uses Metal.
Optional MLX runtime¶
The mlx extra installs uubed's MLX runtime, used by profiles with backend = "mlx":
Install the converters¶
-
Install
markitfor PDFs with a text layer: -
Install
djvulibreif you have DjVu editions: -
Install
doclingif you have scanned PDFs, scanned DjVu files or image-only EPUBs. In a source checkout, use theocrdependency group:For a standalone tool install, add it to the tool environment:
vexy-paraltextruns docling in a child process with the same Python interpreter, so docling must be importable from the environment that runs the tool.
When a converter is missing, the conversion of that edition fails with a message that names the install command. Other editions still convert.
EPUB converter¶
EPUBs are converted by an external script, epub2md.py. The tool looks for it in this order:
- The
VEXY_EPUB2MDenvironment variable. - The
[convert] epub2mdkey inparaltext.toml. - The default path
~/bin/epub2md.py.
The script is run as uv run -s <script> <epub> --output_dir <dir> --merge --force, so uv must be on PATH.
Check the installation¶
vexy-paraltext run --help prints the arguments and flags of the run command. which prints the path of each converter that is on PATH.