A CLI tool to convert Markdown to html, PDF or Image using GitHub's API
Project description
md2static
A lightweight command-line tool that converts Markdown files into static PDFs, Images (PNG/JPEG), or HTML using the official GitHub Markdown API for pixel-perfect styling.
It leverages GitHub's API to parse the Markdown into HTML, wraps it in the official GitHub CSS, and uses a headless browser (Playwright) to capture the styled output.
It is very much inspired by grip.
Install
Install with pip, pipx or uv, e.g
pip install md2static
Note that if you want to output to something different than HTML, then you would also need to install Playwright browser binaries (you only need to do this once), i.e
playwright install chromium
Example usage
HTML
md2static doc.md output.html
md2static input.md output.pdf
PNG
md2static README.md screenshot.png
License
MIT
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 md2static-0.2.0.tar.gz.
File metadata
- Download URL: md2static-0.2.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9963a2a589ffb00fe3dbec75175d402c0839ef023022f08217a34a998ddf29e6
|
|
| MD5 |
fd5243289ddea5a5302f924295a0e76a
|
|
| BLAKE2b-256 |
229624cc2b44d21fd8afef8794e80a10b78b4a128a0ffbb3bc726cf1150bdc06
|
Provenance
The following attestation bundles were made for md2static-0.2.0.tar.gz:
Publisher:
pypi.yml on finsberg/md2static
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
md2static-0.2.0.tar.gz -
Subject digest:
9963a2a589ffb00fe3dbec75175d402c0839ef023022f08217a34a998ddf29e6 - Sigstore transparency entry: 2257142127
- Sigstore integration time:
-
Permalink:
finsberg/md2static@0f8fb310cf8d8483d927ddb073db89244638a266 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/finsberg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@0f8fb310cf8d8483d927ddb073db89244638a266 -
Trigger Event:
push
-
Statement type:
File details
Details for the file md2static-0.2.0-py3-none-any.whl.
File metadata
- Download URL: md2static-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98b90783f0b85108f55d9e6ce7f84139a51be4a4bfd84344d9ec5f429f6fe780
|
|
| MD5 |
2a4a4cf748a7509e48e90ee53f60fcf0
|
|
| BLAKE2b-256 |
5dc52f492e61f3c7bc16dbdd783176223321a68a522474bdcd16034d9ea07a89
|
Provenance
The following attestation bundles were made for md2static-0.2.0-py3-none-any.whl:
Publisher:
pypi.yml on finsberg/md2static
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
md2static-0.2.0-py3-none-any.whl -
Subject digest:
98b90783f0b85108f55d9e6ce7f84139a51be4a4bfd84344d9ec5f429f6fe780 - Sigstore transparency entry: 2257142149
- Sigstore integration time:
-
Permalink:
finsberg/md2static@0f8fb310cf8d8483d927ddb073db89244638a266 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/finsberg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@0f8fb310cf8d8483d927ddb073db89244638a266 -
Trigger Event:
push
-
Statement type: