# mdtoc - [crates.io](https://crates.io/crates/mdtoc) `mdtoc`, short for `m`ark`d`own `t`able `o`f `c`ontents, creates a table of contents for Markdown documents. Markdown table of contents is useful because in additional to providing an overview of the document, it also allows you to jump between headers for easy navigation! For example, try this [link](#todo) which brings you to the `TODO` section of this README. ## Table of Contents 1. [mdtoc](#mdtoc) 1. [Overview](#overview) 1. [Demo](#demo) 1. [TODO](#todo) ## Overview ```bash ~ $ mdtoc --help mdtoc 0.2.0 Jack generate table of contents for markdown USAGE: mdtoc [OPTIONS] FLAGS: -h, --help Prints help information -V, --version Prints version information OPTIONS: -b, --bullet Bullet to use for the lists, for example '*', '-', '1.' [default: 1.] -t, --indent Number of space character, ' ', to use to represent a single indent [default: 4] ARGS: Markdown file to read ``` ## Demo ```bash ~ $ cat in.md # README ## tWo 1 ### tHReE 1 ## TWo 2 ~ $ mdtoc in.md ## Table of Contents 1. [README](#readme) 1. [tWo 1](#two-1) 1. [tHReE 1](#three-1) 1. [TWo 2](#two-2) ``` ## TODO 1. output the original md with toc inserted into it?