Difference between revisions of "Md-toc"

From Free Software Directory
Jump to: navigation, search
(Added Python link)
(Fixed formatting.)
 
(28 intermediate revisions by 2 users not shown)
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=The table of contents generated by this program is designed to work with several markdown parsers such as the one used by GitHub and GitLab.
+
|Full description===Description==
  
When used with the in-place option this script will write the table of contents at the first occurrency of a marker. The default marker is [](TOC) which will result as invisible when reading the parsed markdown file.
+
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.
  
By default, titles up to three indentation levels (in HTML: h1, h2, h3) will be included in the table of contents.
+
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.
  
As a final remark, it is possible to generate an ordered and an unordered table of contents. In both cases, each element of the toc is by default a clickable link to a paragraph in the page. It is also possible to generate non-linked version of the TOC.
+
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
  
Rules for generating the table of contents are determined by the selected markdown parser. md_toc aimes to be as conformant as possible in respect to each one of them.
+
==Features==
|Homepage URL=https://github.com/frnmst/md-toc
+
 
|User level=intermediate
+
* works offline
|Is High Priority Project=No
+
* edits file in place using a TOC marker or output to standard output
|Component programs=Python 3
+
* selection of indentation level
|VCS checkout command=git clone https://github.com/frnmst/md-toc
+
* list indentation based on heading, which can optionally be disabled
|Computer languages=Python
+
* outputs an ordered or unordered TOC list
|Documentation note=Documentation at: http://frnmst.github.io/md-toc
+
* creates anchor links to markdown headings by default or a plain list as alternative
|Accepts cryptocurrency donations=No
+
* checks if heading level is coherent: this avoid creating an erroneous TOC. This feature can be disabled if needed
|Keywords=markdown, md, table-of-contents, toc
+
* skip any number lines before generating the TOC
|Version identifier=2.0.0
+
* can read content from standard input
|Version date=2018/03/18
+
* handles multiple files at once
|Version status=alpha
+
* selection of newline string
|Version download=https://github.com/frnmst/md-toc/archive/2.0.0.tar.gz
+
* selection of list marker
|Version comment=Lots of fixes.
+
* supports GitHub, GitLab, Commonmark, Redcarpet and others
|Last review by=Bendikker
+
* pre-commit hook
|Last review date=2018/04/03
+
|Homepage URL=https://blog.franco.net.eu.org/software/#md-toc
|Submitted date=2018/01/27
+
|Version download=https://blog.franco.net.eu.org/software/md-toc-8.1.3/md-toc-8.1.4.tar.gz
|Is GNU=No
 
 
}}
 
}}
 
{{Project license
 
{{Project license
 
|License=GPLv3orlater
 
|License=GPLv3orlater
|License copyright=Copyright (C) 2017-2018 frnmst (Franco Masotti) <franco.masotti@live.com>
+
|License copyright=Copyright (C) 2017-2022 Franco Masotti (franco \D\o\T masotti {-A-T-} tutanota \D\o\T com)
<franco.masotti@student.unife.it>
 
  
 
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 47: Line 47:
 
You should have received a copy of the GNU General Public License
 
You should have received a copy of the GNU General Public License
 
along with md-toc.  If not, see <http://www.gnu.org/licenses/>.
 
along with md-toc.  If not, see <http://www.gnu.org/licenses/>.
}}
+
|License verified by=agyaanapan
{{Person}}
+
|License verified date=2021-06-13
{{Resource
+
|License note=See also https://docs.franco.net.eu.org/md-toc/copyright_license.html for a list of all the licenses used.
|Resource audience=Python (Ref)
 
|Resource URL=https://pypi.org/project/md-toc
 
 
}}
 
}}
 
{{Software category
 
{{Software category
Line 61: Line 59:
 
|Use=text-creation
 
|Use=text-creation
 
|Works-with=text
 
|Works-with=text
 +
}}
 +
{{EntryGNU
 +
|Is GNU=No
 
}}
 
}}
 
{{Software prerequisite
 
{{Software prerequisite
 
|Prerequisite kind=Required to use
 
|Prerequisite kind=Required to use
|Prerequisite description=https://github.com/frnmst/fpyutils
+
|Prerequisite description=https://blog.franco.net.eu.org/software/#fpyutils
 
}}
 
}}
 
{{Software prerequisite
 
{{Software prerequisite
 
|Prerequisite kind=Required to use
 
|Prerequisite kind=Required to use
 
|Prerequisite description=Python 3
 
|Prerequisite description=Python 3
 +
}}
 +
{{Software prerequisite
 +
|Prerequisite kind=Required to build
 +
|Prerequisite description=Flake8
 +
}}
 +
{{Software prerequisite
 +
|Prerequisite kind=Required to build
 +
|Prerequisite description=flake8-docstrings
 +
}}
 +
{{Software prerequisite
 +
|Prerequisite kind=Required to build
 +
|Prerequisite description=Sphinx
 +
}}
 +
{{Software prerequisite
 +
|Prerequisite kind=Required to use
 +
|Prerequisite description=Setuptools
 +
}}
 +
{{Software prerequisite
 +
|Prerequisite kind=Required to build
 +
|Prerequisite description=Read the Docs Sphinx Theme
 +
}}
 +
{{Software prerequisite
 +
|Prerequisite kind=Required to build
 +
|Prerequisite description=pipenv
 +
}}
 +
{{Software prerequisite
 +
|Prerequisite kind=Required to build
 +
|Prerequisite description=sphinx-tabs
 +
}}
 +
{{Software prerequisite
 +
|Prerequisite kind=Weak prerequisite
 +
|Prerequisite description=pyfakefs
 +
}}
 +
{{Person}}
 +
{{Resource
 +
|Resource audience=Python (Ref)
 +
|Resource URL=https://pypi.org/project/md-toc
 +
}}
 +
{{Resource
 +
|Resource audience=Users, Developers
 +
|Resource kind=Bug Tracking
 +
|Resource URL=https://software.franco.net.eu.org/frnmst/md-toc/issues
 +
}}
 +
{{Resource
 +
|Resource audience=Users, Developers
 +
|Resource kind=Bug Tracking
 +
|Resource URL=https://github.com/frnmst/md-toc/issues
 +
}}
 +
{{Resource
 +
|Resource audience=Users, Developers
 +
|Resource kind=Bug Tracking
 +
|Resource URL=https://codeberg.org/frnmst/md-toc/issues
 +
}}
 +
{{Resource
 +
|Resource audience=Users, Developers
 +
|Resource kind=Bug Tracking
 +
|Resource URL=https://framagit.org/frnmst/md-toc/-/issues
 +
}}
 +
{{Resource
 +
|Resource audience=Documentation
 +
|Resource kind=Support
 +
|Resource URL=https://docs.franco.net.eu.org/md-toc/
 +
}}
 +
{{Resource
 +
|Resource audience=Users, Developers
 +
|Resource kind=Changelog
 +
|Resource URL=https://blog.franco.net.eu.org/software/CHANGELOG-md-toc.html
 +
}}
 +
{{EntryDetails
 +
|Is High Priority Project=No
 +
|VCS checkout command=git clone https://software.franco.net.eu.org/frnmst/md-toc.git
 +
|Computer languages=Python
 +
|Documentation note=Documentation at: https://docs.franco.net.eu.org/md-toc/
 +
|Decommissioned or Obsolete=No
 +
|Donate=https://www.buymeacoffee.com/frnmst
 +
|Keywords=markdown, md, table-of-contents, toc
 +
|Version identifier=8.1.4
 +
|Version date=2022-06-15
 +
|Version status=beta
 +
|Version comment=- Improved readme according to issue #36. - Improved TOC marker detection and TOC substitution in place.
 +
|Last review by=Frnmst
 +
|Last review date=2022-06-17
 +
|User level=intermediate
 +
|Component programs=Python 3
 +
|Accepts cryptocurrency donations=Yes
 +
|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
 +
|Test entry=No
 
}}
 
}}
 
{{Featured}}
 
{{Featured}}

Latest revision as of 17:25, 17 June 2022


[edit]

md-toc

https://blog.franco.net.eu.org/software/#md-toc
Automatically generate a compliant table of contents for a markdown file to improve document readability

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 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

Documentation

Documentation at: https://docs.franco.net.eu.org/md-toc/





Licensing

License

Verified by

Verified on

Notes

Verified by

agyaanapan

Verified on

13 June 2021

Notes

See also https://docs.franco.net.eu.org/md-toc/copyright_license.html for a list of all the licenses used.




Leaders and contributors

Contact(s)Role


Resources and communication

AudienceResource typeURI
Users, DevelopersBug Trackinghttps://framagit.org/frnmst/md-toc/-/issues
Users, DevelopersChangeloghttps://blog.franco.net.eu.org/software/CHANGELOG-md-toc.html
Users, DevelopersBug Trackinghttps://software.franco.net.eu.org/frnmst/md-toc/issues
Users, DevelopersBug Trackinghttps://codeberg.org/frnmst/md-toc/issues
DocumentationSupporthttps://docs.franco.net.eu.org/md-toc/
Users, DevelopersBug Trackinghttps://github.com/frnmst/md-toc/issues
Python (Ref)https://pypi.org/project/md-toc


Software prerequisites

KindDescription
Required to buildflake8-docstrings
Weak prerequisitepyfakefs
Required to buildpipenv
Required to buildsphinx-tabs
Required to usehttps://blog.franco.net.eu.org/software/#fpyutils
Required to buildFlake8
Required to useSetuptools
Required to buildRead the Docs Sphinx Theme
Required to buildSphinx
Required to usePython 3

This entry (in part or in whole) was last reviewed on 17 June 2022.



Version comment

- Improved readme according to issue #36. - Improved TOC marker detection and TOC substitution in place.


Entry
































"Python (Ref)" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property.


"Users" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property."Developers" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property.


"Users" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property."Developers" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property.


"Users" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property."Developers" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property.


"Users" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property."Developers" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property.


"Documentation" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property.


"Users" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property."Developers" is not in the list (General, Help, Bug Tracking, Support, Developer) of allowed values for the "Resource audience" property.







Property "Submitted by" (as page type) with input value "{{{Submitted by}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. "{{{Submitted date}}}" contains an extrinsic dash or other characters that are invalid for a date interpretation.











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.