Skip to main content

Enumerates your markdown headers, inside the md file

Project description

1. Enumerates the headers in a markdown file

Enumerate headers in markdown file.

1.1 Usage:

Run from the command line

markdown-enum inputFile.md outputFile.md

The script will parse someFile.md, add an enumeration to each header and output the result to the file named outputFile.md. All previously existing headers will be overriden. So a useful scenario is

markdown-enum inputFile.md inputFile.md

1.2 Install:

Requires python 3.

pip install enumerate-markdown

1.3 Assumed markdown syntax:

The markdown syntax assumed is the one used by mistune, called "Sane CommonMark"

https://mistune.readthedocs.io/en/latest/intro.html#sane-commonmark

But, with a fine twist: headings defined by a single - or single = are considered too. For example:

This is a heading
-
This is also a heading
=

Project details


Download files

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

Files for enumerate-markdown, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size enumerate_markdown-1.0.0-py3-none-any.whl (5.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size enumerate-markdown-1.0.0.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page