extracttoc
Extract the table of contents from a markdown file with an easy to use command line tool written in Python.
Installation
pip install extracttoc
Usage
usage: extracttoc [-h] [-s] [-c] [-i] [-l LIMIT] file
Extracts the table of contents from a markdown file.
positional arguments:
file Provide a markdown file from which to extract the toc.
optional arguments:
-h, --help show this help message and exit
-s, --save Write the TOC to a md file. File name will be: {input-file-name}-toc.md
-c, --copy Copy the TOC to your clipboard
-i, --insert Insert the TOC directly into the file in front of the first line.
-l LIMIT, --levels LIMIT
Set the number of levels which will be included in the TOC.
Examples
> extracttoc myfile.md # displays the TOC
> extracttoc -c myfile.md # display & copy TOC to clipboard
> extracttoc -l 2 myfile.md # limit TOC to header level 2
> extracttoc -l 2 -s myfile.md # limit TOC to lvl 2 & write to separate file
Metadata
Release files for extracttoc 0.4.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 | Provenance | Actions |
|---|---|---|---|---|
| extracttoc-0.4.0.tar.gz | 5.2 kB | Without provenance | Details for extracttoc-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| extracttoc-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for extracttoc-0.4.0-py3-none-any.whl |
Total release size: 10.8 kB
Release files / extracttoc-0.4.0.tar.gz
| Download URL | extracttoc-0.4.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff6e037ddf3c2cfa501c3e009d339e1796d34c2070568a91f45c0badc7c09069
|
|
BLAKE2b-256 checksum How to use checksums |
fd4b8e2e2d5dff985978ca348ec10927d0b851496c61c402266af5750ae722cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|
Release files / extracttoc-0.4.0-py3-none-any.whl
| Download URL | extracttoc-0.4.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
673aa0c10861d04c875afe22a6df3ef34bc940431da2ecb6d6af7d374120301e
|
|
BLAKE2b-256 checksum How to use checksums |
8a41ce8cbdad1459e143e28c4063fbc3c5731b018a708ae8ab8d5fa6ad76c1d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|
Security for extracttoc 0.4.0
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.