Metadata-Version: 2.4
Name: mark-my-word
Version: 0.1.0
Summary: Convert Markdown file to PDF using themes extracted directly from Word templates
Project-URL: Homepage, https://gitlab.com/tastapod/mark-my-word
Project-URL: Repository, https://gitlab.com/tastapod/mark-my-word.git
Project-URL: Issues, https://gitlab.com/tastapod/mark-my-word/-/issues
Author-email: Daniel Terhorst-North <daniel@dannorth.net>
License-Expression: MIT
Keywords: docx,markdown,pdf,theme,weasyprint,word
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: click~=8.3
Requires-Dist: markdown2~=2.5
Requires-Dist: python-docx~=1.2
Requires-Dist: python-frontmatter~=1.1
Requires-Dist: pyyaml~=6.0
Requires-Dist: weasyprint~=68.1
Description-Content-Type: text/markdown

# 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](https://weasyprint.org). 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

```shell
# 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

- [Repository](https://gitlab.com/tastapod/mark-my-word)
- [Issue tracker](https://gitlab.com/tastapod/mark-my-word/-/issues)
