A CLI tool to render Markdown files to PDF via HTML templates and Playwright.
Project description
Docdo
CLI tool that converts Markdown files to PDF using Playwright and CSS themes.
Install
uv tool install docdo
playwright install chromium
Usage
docdo -i README.md # outputs README.pdf next to it
docdo -i docs/ -o out/ # converts a whole folder
docdo -i README.md -t dracula # use a built-in theme
docdo -i README.md -t ./my-style.css # use a custom CSS file
| Flag | Description |
|---|---|
-i, --input |
Markdown file or folder (required) |
-o, --output |
Output PDF file or folder (defaults to input location) |
-t, --theme |
Built-in theme name (default, dracula) or path to a .css file |
Themes
Built-in themes live in src/docdo/themes/. To add your own, drop a .css file there or just pass any CSS file path with -t.
How it works
- Parses Markdown with
markdown-it-py(withpygmentsfor syntax highlighting). - Wraps the HTML with the selected CSS theme.
- Renders to PDF via Playwright (headless Chromium).
Dev
uv sync
uv run docdo -i README.md
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 docdo-0.0.5.tar.gz.
File metadata
- Download URL: docdo-0.0.5.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f82667f170e0671257058bfb69faacf23ef1dcfc239ed7635fa0970a2a65f52b
|
|
| MD5 |
df229099faaf0f1c39cba31cfbc9623d
|
|
| BLAKE2b-256 |
172566ed107d2042a7e69b701c236c809bab854aaf00bca3fb0ea8a4a72b44c8
|
Provenance
The following attestation bundles were made for docdo-0.0.5.tar.gz:
Publisher:
pypi.yml on javi22020/docdo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docdo-0.0.5.tar.gz -
Subject digest:
f82667f170e0671257058bfb69faacf23ef1dcfc239ed7635fa0970a2a65f52b - Sigstore transparency entry: 1081268400
- Sigstore integration time:
-
Permalink:
javi22020/docdo@e9b40b6d13fe8a1d0ca59f3f4780194ca34b85c1 -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/javi22020
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@e9b40b6d13fe8a1d0ca59f3f4780194ca34b85c1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file docdo-0.0.5-py3-none-any.whl.
File metadata
- Download URL: docdo-0.0.5-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fae04b081965d0a4b2736e2d8ba354d74af39fe3feb6f5a481e4e13c6a7d57ca
|
|
| MD5 |
006973ca392467c02f96cd6c70560f4e
|
|
| BLAKE2b-256 |
6feae1b8664ed92eeb3ff0ad69b0bc4e743f86f9f3bd3a8344d8fb6871a72c95
|
Provenance
The following attestation bundles were made for docdo-0.0.5-py3-none-any.whl:
Publisher:
pypi.yml on javi22020/docdo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docdo-0.0.5-py3-none-any.whl -
Subject digest:
fae04b081965d0a4b2736e2d8ba354d74af39fe3feb6f5a481e4e13c6a7d57ca - Sigstore transparency entry: 1081268449
- Sigstore integration time:
-
Permalink:
javi22020/docdo@e9b40b6d13fe8a1d0ca59f3f4780194ca34b85c1 -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/javi22020
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@e9b40b6d13fe8a1d0ca59f3f4780194ca34b85c1 -
Trigger Event:
release
-
Statement type: