Skip to main content
.. raw:: html

<!-- starttoc -->

Table of contents
=================

- `mdTOC <#mdtoc>`__

- `Installation <#installation>`__
- `Usage <#usage>`__

- `Generate TOC <#generate-toc>`__
- `Generate and update file <#generate-and-update-file>`__

- `Via python <#via-python>`__

- `Optional arguments <#optional-arguments>`__

.. raw:: html

<!-- endtoc -->

mdTOC
=====

Create Table of contents for markdown files

Installation
------------

.. code:: shell

pip install pymdtoc

Usage
-----

Generate TOC
~~~~~~~~~~~~

.. code:: shell

mdtoc generate filename.md

Generate and update file
~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: shell

mdtoc inplace filname.md

Via python
----------

.. code:: python

from pymdtoc import TOC
toc = TOC(file="filename.md")
print(toc.toc)
print(toc.content)

Optional arguments
~~~~~~~~~~~~~~~~~~

- ``toc_heading`` - Table of contents heading (str)
- ``anchor_function`` - Ability to provide custom anchor tag generator

Metadata

Release files for pymdtoc 1.0.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 pymdtoc 1.0.1
File Size Uploaded Provenance Actions
pymdtoc-1.0.1.tar.gz 2.5 kB Without provenance Details for pymdtoc-1.0.1.tar.gz

Release files / pymdtoc-1.0.1.tar.gz

Download URL pymdtoc-1.0.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d8344437caad379e2acf825eb0bb6eb1497bd32d3977b7fb79d3754bee25c6f6
BLAKE2b-256 checksum
How to use checksums
d2081bde2407e78a678adfddcfaee5812863ad61fb8c16c452ae276d1acf806a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pymdtoc 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

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