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.4.tar.gz (220.8 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.4-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file markdown_print-0.0.4.tar.gz.

File metadata

  • Download URL: markdown_print-0.0.4.tar.gz
  • Upload date:
  • Size: 220.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for markdown_print-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2b7822c71140f5dfd9542419dc99cacdaca0386b6060d60ed02456f5e54271e8
MD5 2c477a3bda323e31185b9f45150abb60
BLAKE2b-256 ab2f52fe1083b504f22dcb24720896a780bf3d4289089b507a21c204a276b99c

See more details on using hashes here.

Provenance

The following attestation bundles were made for markdown_print-0.0.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: markdown_print-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for markdown_print-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 793f087955ad26e1ba5664e573e92f46b6ed429757494b476461e93e9224c32e
MD5 56e6a975dda2a58afa53385bd4af43df
BLAKE2b-256 c4fae8978b4616ea3817c61d87658aad6f5f0b05bce2e4769e51bc24c33fc104

See more details on using hashes here.

Provenance

The following attestation bundles were made for markdown_print-0.0.4-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