naokazuterada / MarkdownTOC

SublimeText3 plugin which generate a table of contents (TOC) in a markdown document.
https://packagecontrol.io/packages/MarkdownTOC
MIT License
301 stars 48 forks source link

Provide a MarkdownTOC CLI Tool for non-ST Users #153

Open tajmone opened 4 years ago

tajmone commented 4 years ago

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.

0xdevalias commented 8 months ago

I know this issue is super old, but this might be a good alternative that has both a CLI and web version: