Skip to main content

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 -R by 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.

Markdown rendered in terminal with mdp

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown_print-0.0.1.tar.gz (220.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

markdown_print-0.0.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

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

Hashes for markdown_print-0.0.1.tar.gz
Algorithm Hash digest
SHA256 718c870833818b0e1e5ec80e83207522a318c755cb57092b78c7cb602a2e6234
MD5 5e95937c5fbd805aad0c0d0841cbeb1d
BLAKE2b-256 2a3790b9c709eb73aafc9e45c2959cbc8a4011c0da5be511996e3c1dc377ecd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for markdown_print-0.0.1.tar.gz:

Publisher: publish.yml on jamesls/markdown-print

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for markdown_print-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 35d40119ac1a7687d1c41601f2bded3a37dfb5663aeb0284cc8c250504971578
MD5 20c7de6fde1afb2115eeb9e2e4af19d7
BLAKE2b-256 259dc36ae77a3e25fe6f0c95fda6e52adc7d4febe137ecedb149f6e15fc559b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for markdown_print-0.0.1-py3-none-any.whl:

Publisher: publish.yml on jamesls/markdown-print

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page