Difference between revisions of "Md-toc"
(Fixed formatting.) |
(Update to version 9.0.0.) |
||
(12 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Entry | {{Entry | ||
|Name=md-toc | |Name=md-toc | ||
− | |Short description=Automatically generate | + | |Short description=Automatically generate and add an accurate table of contents to markdown files. |
|Full description===Description== | |Full description===Description== | ||
Line 9: | Line 9: | ||
GitHub and GitLab have introduced their version of the markdown TOC after md-toc and similar tools were created: | 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 | + | * in March 2021 GitHub added an [https://github.blog/changelog/2021-04-13-table-of-contents-support-in-markdown-files/ 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 | + | * GitLab added an [https://docs.gitlab.com/ee/user/markdown.html#table-of-contents extension] called Table of contents to its Gitlab Flavored Mardown |
==Features== | ==Features== | ||
Line 16: | Line 16: | ||
* works offline | * works offline | ||
* edits file in place using a TOC marker or output to standard output | * edits file in place using a TOC marker or output to standard output | ||
− | * selection | + | * maximum heading level selection (1 to 6) |
* list indentation based on heading, which can optionally be disabled | * list indentation based on heading, which can optionally be disabled | ||
* outputs an ordered or unordered TOC list | * outputs an ordered or unordered TOC list | ||
Line 25: | Line 25: | ||
* handles multiple files at once | * handles multiple files at once | ||
* selection of newline string | * selection of newline string | ||
+ | * check if there is difference between existing TOC in file and newly generated one | ||
* selection of list marker | * selection of list marker | ||
* supports GitHub, GitLab, Commonmark, Redcarpet and others | * supports GitHub, GitLab, Commonmark, Redcarpet and others | ||
− | * pre-commit hook | + | * [https://pre-commit.com/ pre-commit] md-toc [https://docs.franco.net.eu.org/md-toc/pre_commit_hook.html hook] |
+ | |||
+ | And more! See the [https://docs.franco.net.eu.org/md-toc/features.html feature comparison table] | ||
|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- | + | |Version download=https://blog.franco.net.eu.org/software/md-toc-9.0.0/md-toc-9.0.0.tar.gz |
}} | }} | ||
{{Project license | {{Project license | ||
|License=GPLv3orlater | |License=GPLv3orlater | ||
− | |License copyright=Copyright (C) 2017- | + | |License copyright=Copyright (C) 2017-2024 Franco Masotti (see /README.md) |
md-toc is free software: you can redistribute it and/or modify | md-toc is free software: you can redistribute it and/or modify | ||
Line 49: | Line 52: | ||
|License verified by=agyaanapan | |License verified by=agyaanapan | ||
|License verified date=2021-06-13 | |License verified date=2021-06-13 | ||
− | |License note=See also https://docs.franco.net.eu.org/md-toc/ | + | |License note=See also https://docs.franco.net.eu.org/md-toc/meta.html#copyright-and-license for a list of all the licenses used. |
}} | }} | ||
{{Software category | {{Software category | ||
Line 55: | Line 58: | ||
|Interface=command-line, console, text | |Interface=command-line, console, text | ||
|Programming-language=python | |Programming-language=python | ||
− | |Runs-on=GNU/Linux | + | |Runs-on=Windows, OS X, GNU/Linux |
|Text-creation=documentation-tool | |Text-creation=documentation-tool | ||
|Use=text-creation | |Use=text-creation | ||
Line 70: | Line 73: | ||
|Prerequisite kind=Required to use | |Prerequisite kind=Required to use | ||
|Prerequisite description=Python 3 | |Prerequisite description=Python 3 | ||
+ | }} | ||
+ | {{Software prerequisite | ||
+ | |Prerequisite kind=Required to use | ||
+ | |Prerequisite description=Setuptools | ||
}} | }} | ||
{{Software prerequisite | {{Software prerequisite | ||
Line 84: | Line 91: | ||
}} | }} | ||
{{Software prerequisite | {{Software prerequisite | ||
− | |Prerequisite kind=Required to | + | |Prerequisite kind=Required to build |
− | |Prerequisite description= | + | |Prerequisite description=sphinx-book-theme |
}} | }} | ||
{{Software prerequisite | {{Software prerequisite | ||
|Prerequisite kind=Required to build | |Prerequisite kind=Required to build | ||
− | |Prerequisite description= | + | |Prerequisite description=sphinx-copybutton |
}} | }} | ||
{{Software prerequisite | {{Software prerequisite | ||
|Prerequisite kind=Required to build | |Prerequisite kind=Required to build | ||
− | |Prerequisite description= | + | |Prerequisite description=venv |
}} | }} | ||
{{Software prerequisite | {{Software prerequisite | ||
|Prerequisite kind=Required to build | |Prerequisite kind=Required to build | ||
− | |Prerequisite description= | + | |Prerequisite description=python3-build |
}} | }} | ||
{{Software prerequisite | {{Software prerequisite | ||
Line 106: | Line 113: | ||
{{Resource | {{Resource | ||
|Resource audience=Python (Ref) | |Resource audience=Python (Ref) | ||
+ | |Resource kind=General | ||
|Resource URL=https://pypi.org/project/md-toc | |Resource URL=https://pypi.org/project/md-toc | ||
}} | }} | ||
Line 137: | Line 145: | ||
|Resource kind=Changelog | |Resource kind=Changelog | ||
|Resource URL=https://blog.franco.net.eu.org/software/CHANGELOG-md-toc.html | |Resource URL=https://blog.franco.net.eu.org/software/CHANGELOG-md-toc.html | ||
+ | }} | ||
+ | {{Resource | ||
+ | |Resource audience=Video | ||
+ | |Resource kind=Support | ||
+ | |Resource URL=https://redirect.invidious.io/watch?v=guyVdPNmC0A | ||
+ | }} | ||
+ | {{Resource | ||
+ | |Resource audience=Video | ||
+ | |Resource kind=Support | ||
+ | |Resource URL=https://redirect.invidious.io/watch?v=6QaW4qv7y1o | ||
}} | }} | ||
{{EntryDetails | {{EntryDetails | ||
Line 145: | Line 163: | ||
|Decommissioned or Obsolete=No | |Decommissioned or Obsolete=No | ||
|Donate=https://www.buymeacoffee.com/frnmst | |Donate=https://www.buymeacoffee.com/frnmst | ||
+ | |Microblog=https://social.franco.net.eu.org/@frnmst | ||
+ | |Related projects=fpyutils | ||
|Keywords=markdown, md, table-of-contents, toc | |Keywords=markdown, md, table-of-contents, toc | ||
− | |Version identifier= | + | |Version identifier=9.0.0 |
− | |Version date= | + | |Version date=2024-04-10 |
− | |Version status= | + | |Version status=stable |
− | |Version comment=- | + | |Version comment=Release 9.0.0 - API change: cleaner module imports. For example: `md_toc.build_toc` becomes `md_toc.api.build_toc` - Fix variables: all of them have snake case when possible - Cleanup constants file - Important bug fixes for edge cases inputs - Add `md_toc.api.anchor_link_punctuation_filter` function - Project structure improvements |
|Last review by=Frnmst | |Last review by=Frnmst | ||
− | |Last review date= | + | |Last review date=2024-04-10 |
|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- | + | |OpenPGP signature=https://blog.franco.net.eu.org/software/md-toc-9.0.0/md-toc-9.0.0.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}} |
Latest revision as of 18:28, 10 April 2024
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.