Skip to main content

ghmd

ghmd (GitHub Markdown) is an extremely light-weight and simple command line tool to convert GitHub Flavored Markdown (or plain Markdown) to HTML.

It does so by using the GitHub Markdown API in combination with GitHub Markdown CSS.

Installation

pip install ghmd

Usage

Simply run ghmd with the path to the markdown file(s) you want to convert. An HTML file will be created in the same directory as the markdown file with the same filename.

ghmd README.md
# or
ghmd README.md CONTRIBUTING.md

[!NOTE] If you don't have the ghmd command available after installing, you may need to add the Python scripts directory to your PATH environment variable.

Otherwise you, can use python -m ghmd instead of ghmd.

Options

GitHub API Token

By default, ghmd uses unauthenticated requests to the GitHub API, which has a rate limit of 60 requests per hour. To increase this limit to 5000 requests per hour, you can set the GITHUB_TOKEN environment variable with a GitHub personal access token:

export GITHUB_TOKEN=your_github_token_here
ghmd README.md

To create a personal access token, visit your GitHub Settings > Developer Settings > Personal access tokens and create a new token (no specific scopes are required).

--embed-css

By default, ghmd will add the remote CSS as a <link> tag in the HTML file. If you want to embed the CSS directly into the HTML file so that, for example, you can send the HTML file to someone else and they can view it without an internet connection, you can use the --embed-css option.

ghmd README.md --embed-css

--light and --dark

The default CSS styles adapt to the system's dark mode setting of the reader. If you want to force the CSS to be light or dark, you can use the --light or --dark options.

ghmd README.md --light
# or
ghmd README.md --dark

Both --light and --dark can be used in combination with --embed-css.

[!NOTE] Using the --embed-css option will result in a ~25 KB larger HTML file size (~18 KB when using --light or --dark).

--no-gfm

The tool offers two modes: GitHub Flavored Markdown (gfm, default) and plain Markdown. To use the later, the --no-gfm option can be used:

ghmd README.md --no-gfm

Metadata

Release files for behsareport 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for behsareport 0.4.1
File Size Uploaded Provenance Actions
behsareport-0.4.1.tar.gz 5.1 kB Without provenance Details for behsareport-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for behsareport 0.4.1
File Interpreter ABI Platform Actions
behsareport-0.4.1-py3-none-any.whl Python 3 none any Details for behsareport-0.4.1-py3-none-any.whl

Total release size: 10.5 kB

Release files / behsareport-0.4.1.tar.gz

Download URL behsareport-0.4.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
24324348a7d163674505752060a5326007b4927e99e8506d90bfcde73b354aa0
BLAKE2b-256 checksum
How to use checksums
cfa2e04de570667a09ef86b2be6aa26e270d9610264bfab80451e5374271e1c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / behsareport-0.4.1-py3-none-any.whl

Download URL behsareport-0.4.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
413c2aeeecfccf3e04815d3d800901c3c21386775ed04f0d431afdf27adc33cb
BLAKE2b-256 checksum
How to use checksums
8a1e6b5b9edcb8f1f2df5824a371d99a7147e0f9529b32289330ed1c63a77a52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for behsareport 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page