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.4.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.4-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docdo-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 c34c7038396842796695bc10e5f39ad718b703edf59a550b79918c651bf925da
MD5 5f5d9c1a4ef91bcc2dc767577ad399fd
BLAKE2b-256 5d488658d74d8c92b83a17bb0e6201e2ea78c34fa930eccec3bc439b67b387a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for docdo-0.0.4.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.4-py3-none-any.whl.

File metadata

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

Hashes for docdo-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9b2b19f142a897f9419346a9d10b114c76a896f1807c71f88cadda1fbd0d4726
MD5 906808b5832dced468ba76382ff51711
BLAKE2b-256 cb38db5779a283c12e036621c4eb7005e76a76c3e33233db8cc3acabafd73073

See more details on using hashes here.

Provenance

The following attestation bundles were made for docdo-0.0.4-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