https://github.com/djeada/markdown-table-of-contents-generator
Generate a table of contents from the headers of your markdown file.
https://github.com/djeada/markdown-table-of-contents-generator
html python-strings tags
Last synced: 3 months ago
JSON representation
Generate a table of contents from the headers of your markdown file.
- Host: GitHub
- URL: https://github.com/djeada/markdown-table-of-contents-generator
- Owner: djeada
- License: mit
- Created: 2020-08-02T18:49:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T10:45:59.000Z (almost 3 years ago)
- Last Synced: 2025-02-05T11:51:54.728Z (4 months ago)
- Topics: html, python-strings, tags
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Md-table-of-contents-generator
Generate a table of contents from the headers of your markdown file.
## Table of Contents
- [Md-table-of-contents-generator](#Md-table-of-contents-generator)
- [Purpose](#Purpose)
- [Installation](#Installation)
- [Usage](#Usage)
- [Contributing](#Contributing)
- [License](#License)## Purpose
This script will create a table of contents for a specified markdown file.
A table of contents may be generated for headers defined using html tags as well as headers defined with markdown syntax.
If the provided file already has a table of contents, the script will replace it with the new one.## Installation
It is advisable to use virtualenv to install the program.
git clone https://github.com/djeada/Markdown-table-of-contents-generator.git
cd md-table-of-contents-generator
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt## Usage
Use the following command to display the help:
cd md-table-of-contents-generator
python md-table-of-contents-generator.py --helpUse the following command to generate the table of contents for a markdown file with the filename README.md and save it to the file README.md.toc:
python md-table-of-contents-generator.py --input=README.md --output=README.md.toc
## Contributing
It is an open source project, so feel free to contribute!## License
This project is licensed under the MIT license.