A markdown toolbox
Project description
marksmith
A Markdown toolbox — write docs in Markdown, ship them as polished DOCX.
Installation
pip install marksmith
Optional extras for template support (coming soon):
pip install marksmith[template]
Quick start
# Using the installed script
marksmith convert my-doc.md output.docx
# Or via python -m
python -m marksmith convert my-doc.md output.docx
Markdown front-matter
You can add a YAML front-matter block at the top of your Markdown file. The metadata is written to the DOCX core properties (title, author, etc.) and will be used to populate template placeholders once template support is available.
---
title: My Document
version: 1.0
author: Paul Cummings
date: 2026-03-16
classification: Internal
---
# My Document
Content goes here...
Supported Markdown elements
| Element | Status |
|---|---|
| Headings H1 – H6 | ✅ |
| Bold / italic / inline code | ✅ |
| Fenced and indented code blocks | ✅ |
| Unordered lists (nested) | ✅ |
| Ordered lists (nested) | ✅ |
| Block-quotes | ✅ |
| Tables | ✅ |
| Thematic breaks (horizontal rules) | ✅ |
| Strikethrough | ✅ |
| Links (text rendered, no hyperlink) | ⚠️ |
| Images | ⚠️ placeholder text only |
| Inline HTML | ➖ ignored |
Roadmap
Template support (next milestone)
The goal is to allow teams to maintain brand-consistent DOCX output without leaving Markdown. The workflow will be:
-
A corporate
.docxtemplate carries the company's styles, logo, header, footer, and cover page. Jinja2-style tags act as placeholders:{{ title }} {{ version }} {{ author }} {{ date }} {{ classification }}
-
A special
{{ marksmith_content }}tag marks the exact point in the template where the converted Markdown body will be inserted. -
Run the conversion:
marksmith convert my-doc.md output.docx --template company-template.docx
marksmith will:
- Render all front-matter metadata into the Jinja2 placeholders.
- Convert the Markdown body to DOCX-native content.
- Insert the converted content at
{{ marksmith_content }}. - Save the merged document as
output.docx.
Implemented via docxtpl — install the
marksmith[template] extra when this ships.
Planned future actions
| Action | Description |
|---|---|
convert |
Markdown → DOCX (available now) |
convert --template |
Merge into branded DOCX template (coming soon) |
lint |
Validate Markdown style and structure |
toc |
Generate / update table of contents |
diff |
Show structural diff between two Markdown files |
Development
git clone https://github.com/tkdpython/marksmith
cd marksmith
pip install -e .[dev]
# Run tests
pytest
# Lint
ruff check .
Releasing
- Bump
__version__inmarksmith/__init__.py. - Commit and push.
- Create a GitHub Release with a tag matching the version (e.g.
v0.2.0). - The publish workflow fires automatically and publishes to PyPI via OIDC Trusted Publisher — no API tokens needed.
License
MIT — see LICENSE.
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
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 marksmith-0.1.0.tar.gz.
File metadata
- Download URL: marksmith-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db7cae55514e7f770f67a79a80e6116b8f3cce30040bc9a1df447322aa284878
|
|
| MD5 |
b74615b7a8c15e308fc2b5159ec87d3e
|
|
| BLAKE2b-256 |
97a4f49dce52db7e87c6d180cb6f29d51d5ab0f3f5fa187aa831580070e8fe97
|
Provenance
The following attestation bundles were made for marksmith-0.1.0.tar.gz:
Publisher:
publish.yml on tkdpython/marksmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
marksmith-0.1.0.tar.gz -
Subject digest:
db7cae55514e7f770f67a79a80e6116b8f3cce30040bc9a1df447322aa284878 - Sigstore transparency entry: 1110717292
- Sigstore integration time:
-
Permalink:
tkdpython/marksmith@4a2e4b39fef422fa8736928f2f8e256e52e43b8f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tkdpython
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a2e4b39fef422fa8736928f2f8e256e52e43b8f -
Trigger Event:
release
-
Statement type:
File details
Details for the file marksmith-0.1.0-py3-none-any.whl.
File metadata
- Download URL: marksmith-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfa8bfa2b5bfdd905cdc9417d3f505702b3c0bb720c36fec080318938f0f979c
|
|
| MD5 |
40cb843aecee3a70e79a9c5529ffe682
|
|
| BLAKE2b-256 |
caa6ce2848c49b6249529aa13baf42fea969300b17eb96a812d9950956eb4343
|
Provenance
The following attestation bundles were made for marksmith-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on tkdpython/marksmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
marksmith-0.1.0-py3-none-any.whl -
Subject digest:
dfa8bfa2b5bfdd905cdc9417d3f505702b3c0bb720c36fec080318938f0f979c - Sigstore transparency entry: 1110717296
- Sigstore integration time:
-
Permalink:
tkdpython/marksmith@4a2e4b39fef422fa8736928f2f8e256e52e43b8f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tkdpython
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a2e4b39fef422fa8736928f2f8e256e52e43b8f -
Trigger Event:
release
-
Statement type: