Skip to content

cyriac/pymdtoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

mdTOC

Create Table of contents for markdown files

Installation

pip install pymdtoc

Usage

Generate TOC

mdtoc generate filename.md

Generate and update file

mdtoc inplace filname.md

Via python

from pymdtoc import TOC
toc = TOC(file="filename.md")
print(toc.toc)
print(toc.content)

Optional arguments

  • toc_heading - Table of contents heading (str)
  • anchor_function - Ability to provide custom anchor tag generator

About

Add table of contents to markdown files

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages