Pandocster: a CLI helper around pandoc workflows, it helps you to build your documentation from markdown files.
Project description
Pandocster
Pandocster is a CLI helper around pandoc workflows. It builds a single document (PDF, HTML, and other formats) from a tree of Markdown files with minimal configuration.
Quick start
$ pandocster check
$ pandocster build ./docs/md --to docx
The resulting DOCX (or other format) is written in the current directory; the default output name is derived from the current working directory unless you pass --file-name.
What it does
- Build — Runs pandoc on the prepared tree with configurable options, metadata, and Lua filters. Includes built-in filters:
absorb_nonvisual_paragraphs,header_offset,link_anchors,newpage. During preparation stagePandocsterbuilds a staging tree from a source Markdown directory: copies files, injects header-offset and anchor comments for structure, rewrites image links into a sharedresources/directory, and preprocesses reference-style links. - Check —
pandocster checkverifies that pandoc (≥3.8.3) and its Lua engine (≥5.4) are installed and sufficient. - Config — Optional
pandocster.yamlin the project directory or~/.config/pandocster/config.yamlglobally. Usepandocster config showto print the effective config andpandocster config createto write apandocster.yamlin the current directory.
How it works
- You simply run
pandocster build <src> --to <format>(e.g.pdf,html) and you get standalone file. - Config is loaded from the current directory (
pandocster.yaml), then global config, then built-in defaults. - Build collects all
.mdfiles under the build directory (with_index.mdfirst per directory), runs pandoc with the configured filters and metadata, and writes the output in the current working directory as<file-name>.<format>. The build directory can be removed after success unless you pass--preserve-build.
Installation
Install Pandocster with pipx so the tool runs in an isolated environment and the pandocster command is available globally:
pipx install pandocster
From a local clone:
pipx install .
You must have pandoc (and its built-in Lua engine) installed separately. Run pandocster check to verify versions.
- Windows:
winget install JohnMacFarlane.Pandoc - Debian:
sudo apt install pandoc. - RHEL:
# dnf install pandoc. - Arch:
pacman -S pandoc.
And there are more ways to install, please refer to official documentation https://pandoc.org/installing.html.
Requirements
- Python ≥3.10
- pandoc ≥3.8.3 with Lua ≥5.4
Commands
| Command | Description |
|---|---|
pandocster check |
Verify pandoc and Lua versions |
pandocster build <src> [build] --to <format> |
Prepare and render a document (e.g. --to pdf) |
pandocster config show |
Print effective config as YAML |
pandocster config create [--global] [--force] |
Write config file locally or globally |
Development
1. Create and activate a virtual environment
python -m venv .venv
source .venv/Scripts/activate # Windows (Git Bash)
source .venv/bin/activate # macOS / Linux
2. Install the project in editable mode with dev dependencies
pip install -e ".[dev]"
The -e flag makes changes in src/ immediately available without reinstalling.
3. Run the test suite
pytest
4. Verify the CLI works
pandocster --help
pandocster check
pandocster config show
pandocster config create
pandocster config create --force # overwrite without prompting
pandocster config create --global # write ~/.config/pandocster/config.yaml
pandocster config create --global --force # overwrite global config
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pandocster-2.2.0.tar.gz.
File metadata
- Download URL: pandocster-2.2.0.tar.gz
- Upload date:
- Size: 992.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c19367d284ef9e56c716300951803f2c840b6500339686133be7704f3695eca
|
|
| MD5 |
bf0e5cbcf1216c839f1049250262ecef
|
|
| BLAKE2b-256 |
e9f8bbf10b3f1a40e1fcbf08f248ce39a20d2447602e739a78a39272e4a96840
|
File details
Details for the file pandocster-2.2.0-py3-none-any.whl.
File metadata
- Download URL: pandocster-2.2.0-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bb47fdd0739324e0dc761e543f2bbd9bccfb060be295ffbb47e576bd69307da
|
|
| MD5 |
5fa71cdac271f7b360c7b1961e61fb89
|
|
| BLAKE2b-256 |
7eee2fce956d57db6dd811bef9dba0358551a60a5a393c732a927a510d48e061
|