Create Table of contents for markdown files
pip install pymdtoc
mdtoc generate filename.md
mdtoc inplace filname.md
from pymdtoc import TOC
toc = TOC(file="filename.md")
print(toc.toc)
print(toc.content)
toc_heading
- Table of contents heading (str)anchor_function
- Ability to provide custom anchor tag generator