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 renderconverts Markdown to HTML, merges it with the theme's header/footer fragments, and renders to PDF via WeasyPrintmark-my-word extractreads 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.cssplus optional HTML fragment files and awatermark.png
Learn more
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecfe2f8e8cce164d8e5f8bce21af987dbc081b426d8273b1554a4c48a3b7d03b
|
|
| MD5 |
1d765c340ae92af7ca60ec1fcf0032af
|
|
| BLAKE2b-256 |
863a4ec6c18f14571585fe218cbd8bec26a05717f5c2da2ecfa30d2e092e0099
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03a2937427299f4f8655a4f31e307cbecdaa9f400e3b8f1f7595747ffee189d6
|
|
| MD5 |
0bda7ac2b250a5d6bbdc4456741d010e
|
|
| BLAKE2b-256 |
9b3f76463fa27a05dc6acbc25b185b8c961c35da8f2c985f9567a90e5ac9b832
|