Markdown Syntax Renderer
Project description
markdown-print
A thin wrapper around Rich's markdown renderer with opinionated defaults for terminal display. Rich does all the actual parsing and rendering, this package just configures it with:
- Nord-darker theme for code blocks with matching inline code styling
- Left-aligned headings with visible
#prefix markers - H1 rendered in a panel, other headings styled normally
- Paged output via
less -Rby default (preserves ANSI colors) - Horizontally centered content within a 100-character width
- A
render_markdown()function for programmatic use
I found myself continually copying this around or making one-off scripts with these defaults, so I packaged it up in a repo so I can install it as needed.
There's intentionally no config files nor are there a lot of options, it's meant to represent how I prefer markdown rendered in the terminal.
Installation
uv tool install markdown-print
Usage
mdp path/to/file.md
Development
This project requires Python 3.12 and uses uv to manage dependencies.
You can create a virtual environment with all the necessary dependencies by running:
uv sync --all-extras --dev
This will install all necessary dependencies and install this project in editable mode.
You can activate the venv with:
. .venv/bin/activate
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 markdown_print-0.0.1.tar.gz.
File metadata
- Download URL: markdown_print-0.0.1.tar.gz
- Upload date:
- Size: 220.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
718c870833818b0e1e5ec80e83207522a318c755cb57092b78c7cb602a2e6234
|
|
| MD5 |
5e95937c5fbd805aad0c0d0841cbeb1d
|
|
| BLAKE2b-256 |
2a3790b9c709eb73aafc9e45c2959cbc8a4011c0da5be511996e3c1dc377ecd8
|
Provenance
The following attestation bundles were made for markdown_print-0.0.1.tar.gz:
Publisher:
publish.yml on jamesls/markdown-print
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
markdown_print-0.0.1.tar.gz -
Subject digest:
718c870833818b0e1e5ec80e83207522a318c755cb57092b78c7cb602a2e6234 - Sigstore transparency entry: 821315411
- Sigstore integration time:
-
Permalink:
jamesls/markdown-print@6762ad890a7901c6abe6723d213b67238f136706 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/jamesls
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6762ad890a7901c6abe6723d213b67238f136706 -
Trigger Event:
push
-
Statement type:
File details
Details for the file markdown_print-0.0.1-py3-none-any.whl.
File metadata
- Download URL: markdown_print-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.0 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 |
35d40119ac1a7687d1c41601f2bded3a37dfb5663aeb0284cc8c250504971578
|
|
| MD5 |
20c7de6fde1afb2115eeb9e2e4af19d7
|
|
| BLAKE2b-256 |
259dc36ae77a3e25fe6f0c95fda6e52adc7d4febe137ecedb149f6e15fc559b5
|
Provenance
The following attestation bundles were made for markdown_print-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on jamesls/markdown-print
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
markdown_print-0.0.1-py3-none-any.whl -
Subject digest:
35d40119ac1a7687d1c41601f2bded3a37dfb5663aeb0284cc8c250504971578 - Sigstore transparency entry: 821315420
- Sigstore integration time:
-
Permalink:
jamesls/markdown-print@6762ad890a7901c6abe6723d213b67238f136706 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/jamesls
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6762ad890a7901c6abe6723d213b67238f136706 -
Trigger Event:
push
-
Statement type: