Difference between revisions of "Md-toc"
(Updated version.) |
(Updated version.) |
||
Line 2: | Line 2: | ||
|Name=md-toc | |Name=md-toc | ||
|Short description=Automatically generate a compliant table of contents for a markdown file to improve document readability | |Short description=Automatically generate a compliant table of contents for a markdown file to improve document readability | ||
− | |Full description= | + | |Full description===Description== |
− | |||
− | + | The table of contents (a.k.a: TOC) generated by this program is designed to work with several markdown parsers such as the ones used by GitHub and GitLab. | |
− | |||
− | |||
− | |||
− | + | Rules for generating the TOC are determined by the selected markdown parser. md-toc aimes infact to be as conformant as possible in respect to each one of them. This was possible by studying the available documentations and by reverse engineering the source codes. | |
− | |||
− | |||
− | + | GitHub and GitLab have introduced their version of the markdown TOC after md-toc and similar tools were created: | |
− | + | * in March 2021 GitHub added an interactive TOC button at the top-left of readme files. This system works for markdown and others | |
− | + | * GitLab added an extension called Table of contents to its Gitlab Flavored Mardown | |
− | |||
− | + | ==Features== | |
− | |||
− | + | * works offline | |
− | + | * edits file in place using a TOC marker (default `<!--TOC-->`) or | |
− | + | output to standard output | |
− | + | * selection of indentation level | |
+ | * list indentation based on heading, which can optionally be disabled | ||
+ | * outputs an ordered or unordered TOC list | ||
+ | * creates anchor links to markdown headings by default or a plain list | ||
+ | as alternative | ||
+ | * checks if heading level is coherent: this avoid creating an | ||
+ | erroneous TOC. This feature can be disabled if needed | ||
+ | * skip any number lines before generating the TOC | ||
+ | * can read content from standard input | ||
+ | * handles multiple files at once | ||
+ | * selection of newline string | ||
+ | * selection of list marker | ||
+ | * supports GitHub, GitLab, Commonmark, Redcarpet and others | ||
+ | * pre-commit hook | ||
|Homepage URL=https://blog.franco.net.eu.org/software/#md-toc | |Homepage URL=https://blog.franco.net.eu.org/software/#md-toc | ||
− | |Version download=https://blog.franco.net.eu.org/software/md-toc-8.1.3/md-toc-8.1. | + | |Version download=https://blog.franco.net.eu.org/software/md-toc-8.1.3/md-toc-8.1.4.tar.gz |
}} | }} | ||
{{Project license | {{Project license | ||
Line 96: | Line 101: | ||
|Prerequisite kind=Required to build | |Prerequisite kind=Required to build | ||
|Prerequisite description=sphinx-tabs | |Prerequisite description=sphinx-tabs | ||
+ | }} | ||
+ | {{Software prerequisite | ||
+ | |Prerequisite kind=Weak prerequisite | ||
+ | |Prerequisite description=pyfakefs | ||
}} | }} | ||
{{Person}} | {{Person}} | ||
Line 140: | Line 149: | ||
|Donate=https://www.buymeacoffee.com/frnmst | |Donate=https://www.buymeacoffee.com/frnmst | ||
|Keywords=markdown, md, table-of-contents, toc | |Keywords=markdown, md, table-of-contents, toc | ||
− | |Version identifier=8.1. | + | |Version identifier=8.1.4 |
− | |Version date=2022- | + | |Version date=2022-06-15 |
|Version status=beta | |Version status=beta | ||
− | |Version comment=- | + | |Version comment=- Improved readme according to issue #36. - Improved TOC marker detection and TOC substitution in place. |
|Last review by=Frnmst | |Last review by=Frnmst | ||
− | |Last review date=2022- | + | |Last review date=2022-06-17 |
|User level=intermediate | |User level=intermediate | ||
|Component programs=Python 3 | |Component programs=Python 3 | ||
|Accepts cryptocurrency donations=Yes | |Accepts cryptocurrency donations=Yes | ||
− | |OpenPGP signature=https://blog.franco.net.eu.org/software/md-toc-8.1. | + | |OpenPGP signature=https://blog.franco.net.eu.org/software/md-toc-8.1.4/md-toc-8.1.4.tar.gz.sig |
|OpenPGP public key=https://blog.franco.net.eu.org/pubkeys/pgp_pubkey_since_2019.txt | |OpenPGP public key=https://blog.franco.net.eu.org/pubkeys/pgp_pubkey_since_2019.txt | ||
|Test entry=No | |Test entry=No | ||
}} | }} | ||
{{Featured}} | {{Featured}} |
Revision as of 17:21, 17 June 2022
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the page “GNU Free Documentation License”.
The copyright and license notices on this page only apply to the text on this page. Any software or copyright-licenses or other similar notices described in this text has its own copyright notice and license, which can usually be found in the distribution or license text itself.