boringmd
boringmd is a Python package and command line tool for extracting plain text and front matter from Markdown.
Installation
boringmd requires Python 3.9 or later.
pip install boringmd
Command line
Pass the filename of a Markdown document to extract its plain text content:
boringmd input.md
To extract the front matter only, include the --front-matter flag:
boringmd input.md --front-matter
boringmd prints to stdout. To write the extraction to a file, redirect it:
boringmd input.md > output.txt
Package
from boringmd import front_matter_from_string, text_from_string
markdown = "---\nfoo: bar\n---\n**foo** and _bar_"
print(text_from_string(markdown))
# foo and bar
print(front_matter_from_string(markdown))
# foo: bar
from pathlib import Path
from boringmd import front_matter_from_file, text_from_file
print(text_from_file(Path("input.md")))
print(front_matter_from_file(Path("input.md")))
Related packages
boringmd uses cariad/lstr to manipulate strings.
Metadata
Release files for boringmd 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| boringmd-1.2.0.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| boringmd-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 kB
Release files / boringmd-1.2.0.tar.gz
| Download URL | boringmd-1.2.0.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73fd7e42dafad042df9dc2e11ced37e579db6e60e06d524e885690bfde860ad7
|
|
BLAKE2b-256 checksum How to use checksums |
fb12bb091f366d87077f3658f69396d2e588176514f6bc45a21085eae033bd77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 8, 2025.
Transparency logRelease files / boringmd-1.2.0-py3-none-any.whl
| Download URL | boringmd-1.2.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df7e141439922add64cb8bd6eaee410f7936fc7f429c5348f1861cf43f172316
|
|
BLAKE2b-256 checksum How to use checksums |
756076697b6e1a129b7e39df4cb9077ce51622708a0ac21af4abc56f6524141b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 8, 2025.
Transparency log