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

Uploaded Python 3

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

Hashes for docdo-0.0.5.tar.gz
Algorithm Hash digest
SHA256 f82667f170e0671257058bfb69faacf23ef1dcfc239ed7635fa0970a2a65f52b
MD5 df229099faaf0f1c39cba31cfbc9623d
BLAKE2b-256 172566ed107d2042a7e69b701c236c809bab854aaf00bca3fb0ea8a4a72b44c8

See more details on using hashes here.

Provenance

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

Hashes for docdo-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fae04b081965d0a4b2736e2d8ba354d74af39fe3feb6f5a481e4e13c6a7d57ca
MD5 006973ca392467c02f96cd6c70560f4e
BLAKE2b-256 6feae1b8664ed92eeb3ff0ad69b0bc4e743f86f9f3bd3a8344d8fb6871a72c95

See more details on using hashes here.

Provenance

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