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.2.tar.gz (16.3 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.2-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docdo-0.0.2.tar.gz
  • Upload date:
  • Size: 16.3 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.2.tar.gz
Algorithm Hash digest
SHA256 31a452336bc660cc1b7d888276b580913da2d8715c2e0774b4b6dc397219cb56
MD5 9c46bcf8577a65ff0513501afd62eb28
BLAKE2b-256 3b8769db494a25118068439fc8acee4e5c78eb65b68b83730f153b7fa3e0779f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: docdo-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 52eb8b73ac71cfc6a61a14672f749adbb6b18c9401570ca931c9daf8c8966c1e
MD5 928905b2d5648f07ca2acbdf2956631d
BLAKE2b-256 115f6a1898fa96454aa24baaa8945e0e8d56efb71e1bac203498c29e8ddea13e

See more details on using hashes here.

Provenance

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