Table Of Contents wO Tsukuru
Project description
tocot
Table Of Contents wO Tsukuru
This script build a TOC for markdown
Required
Python >= 3.6
Install
pip install tocot
Usage
$ tocot --help
Usage: tocot [OPTIONS] IN_FILE OUT_FILE
Options:
-l, --level INTEGER [default: 2]
-e, --to_embed TEXT [default: [TOC]]
--exclude_symbol TEXT [default: exclude-toc]
--help Show this message and exit.
example
You have to write "[TOC]" in your markdown file, then run below command, "[TOC]" is replaced to Table of Contents.
$ tocot README.md new_README.md
If you want to change "[TOC]" to "table of contents template".
$ tocot -e "table of contents template" README.md new_README.md
You can select how deep include Table of contents. Including title level is defined the number of "#".
$ tocot -l 4 README.md new_README.md
If you want to exclude title, you write comment "exclude-toc" next to the title.
$ tocot README.md new_README.md
You can change "exclude-toc" to "i hate this title".
$ tocot --exclude_symbol "i hate this title" README.md new_README.md
if you want to debug, you can write to stdout.
$ tocot README.md -
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tocot-0.1.6.tar.gz
(3.8 kB
view hashes)
Built Distribution
tocot-0.1.6-py3-none-any.whl
(4.3 kB
view hashes)