Skip to main content

Table Of Contents wO Tsukuru

Project description

Python

tocot

Table Of Contents wO Tsukuru

This script build a TOC for markdown

Required

Python >= 3.7

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-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

tocot-1.0.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file tocot-1.0.0.tar.gz.

File metadata

  • Download URL: tocot-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.5 Darwin/19.6.0

File hashes

Hashes for tocot-1.0.0.tar.gz
Algorithm Hash digest
SHA256 721896e132ad1fa87ad6fdd867cb2373e862f4ab0f5a9c841ef380bc033fa92c
MD5 ab4ec1f083682c49e5fad0a2b4c0eda3
BLAKE2b-256 fc29813654547f04a240bcef9416bd6e8d83f14422f8d5f403b96a9c7f3128fb

See more details on using hashes here.

File details

Details for the file tocot-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tocot-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.5 Darwin/19.6.0

File hashes

Hashes for tocot-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ddb36522662745272267d1ea279784035760dca2780c6123013a5d7172019a68
MD5 7c9be6974fa8bf752c9d82791397feb3
BLAKE2b-256 76f98ba21f751c73dfe79a0386c2f42e78de94f2e27bbb7345f9dc06958d08ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page