Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 823 Bytes

README.md

File metadata and controls

48 lines (35 loc) · 823 Bytes

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