Skip to main content

Convert Markdown file to PDF using themes extracted directly from Word templates

Project description

mark-my-word

Convert Markdown files to styled PDFs — and extract themes directly from Word templates.

What it does

mark-my-word renders Markdown to PDF using CSS Paged Media via WeasyPrint. Styling lives in a theme directory containing a stylesheet and HTML fragments for headers and footers. The companion extract subcommand pulls a theme straight out of a .docx or .dotx file, so your PDFs can match an existing Word template without manual CSS work.

Quick start

# Install with uv or pipx
uv tool install mark-my-word
pipx install mark-my-word

# Extract a theme from a Word template
mark-my-word extract my-template.dotx --output themes/my-theme/

# Render a Markdown file using that theme
mark-my-word render document.md --theme themes/my-theme/ --output document.pdf

How it works

  • mark-my-word render converts Markdown to HTML, merges it with the theme's header/footer fragments, and renders to PDF via WeasyPrint
  • mark-my-word extract reads a Word document's theme colours, fonts, heading styles, page margins, header/footer content, and watermark, then writes a ready-to-use theme directory
  • Themes are plain directories — a style.css plus optional HTML fragment files and a watermark.png

Learn more

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

mark_my_word-0.1.0.tar.gz (67.0 kB view details)

Uploaded Source

Built Distribution

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

mark_my_word-0.1.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file mark_my_word-0.1.0.tar.gz.

File metadata

  • Download URL: mark_my_word-0.1.0.tar.gz
  • Upload date:
  • Size: 67.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mark_my_word-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ecfe2f8e8cce164d8e5f8bce21af987dbc081b426d8273b1554a4c48a3b7d03b
MD5 1d765c340ae92af7ca60ec1fcf0032af
BLAKE2b-256 863a4ec6c18f14571585fe218cbd8bec26a05717f5c2da2ecfa30d2e092e0099

See more details on using hashes here.

File details

Details for the file mark_my_word-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mark_my_word-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mark_my_word-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03a2937427299f4f8655a4f31e307cbecdaa9f400e3b8f1f7595747ffee189d6
MD5 0bda7ac2b250a5d6bbdc4456741d010e
BLAKE2b-256 9b3f76463fa27a05dc6acbc25b185b8c961c35da8f2c985f9567a90e5ac9b832

See more details on using hashes here.

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