Skip to main content

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

  1. Parses Markdown with markdown-it-py (with pygments for syntax highlighting).
  2. Wraps the HTML with the selected CSS theme.
  3. 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

docdo-0.0.3.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docdo-0.0.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file docdo-0.0.3.tar.gz.

File metadata

  • Download URL: docdo-0.0.3.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

Hashes for docdo-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2de5133a242217f8a0b6c2d96dbc1ec16bcd275ff96905314ef583953bd27eae
MD5 5fd74b7b57785f070d1d9967e6c41e61
BLAKE2b-256 6ec5b9df67a1fac4f9bbd3fd6c5f88270988acfc617e6e0a3dec25598162af53

See more details on using hashes here.

Provenance

The following attestation bundles were made for docdo-0.0.3.tar.gz:

Publisher: pypi.yml on javi22020/docdo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docdo-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: docdo-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docdo-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5806078ee7b9c1153a2e25da1f4c9dcc98d3b2d041c6505916e92f22e2504149
MD5 24076d53fb0063a3ab8a90005dc47dc1
BLAKE2b-256 a41c7ca716d398a852bcbd6330d2625941e9f05209c8f0d2993669179d80d4cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for docdo-0.0.3-py3-none-any.whl:

Publisher: pypi.yml on javi22020/docdo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page