Open tajmone opened 4 years ago
I know this issue is super old, but this might be a good alternative that has both a CLI and web version:
Online and command-line Markdown TOC generator, with built-in support for BitBucket Server, GitHub, Gitlab, dev.to and more!
Provide a Python CLI tool version of MarkdownTOC to allow non-ST users to contribute to repos that employ MarkdownTOC in markdown documents.
Purpose
MarkdownTOC is the best TOC package for ST and always use it to maintain the TOC in the markdown docs of my repositories. Unfortunately, I often experience issues with contributors who don't use ST and have problems updating the TOC — either attempting to do it manually or leaving it as it is and expecting me to fix it in a further commit.
It would be really cool if a Python CLI tool could be also provided from the same codebase of this repository, allowing non-ST users to update the TOC via the command line.
Furthermore, this tool could be used via Continuous Integration tools (like Travis CI, Circle CI, etc.) for automation purposes (e.g. validating that the TOC is up-to-date in commits and PRs, or even updating it via the CI service).
How important it is
I believe that developing MarkdownTOC as both a ST package and a CLI tool would contribute to its adoption as a TOC-generator for markdown documents in Git repositories, since it would remove the current constraint of needing ST to benefit from it.
Possibly, this could also draw more contributors to the project.
Ideal implementation
The same core codebase for the ST package should be share for the CLI tool in order to prevent maintenance issues and ensure that both the ST package and the CLI tool behave consistently.
Maybe the core Python code of the package could be move to an independent repository and be included as a Git submodule in the repositories of the ST package and the CLI tool.