Skip to content

Adamocho/smalltoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMALL TOC

Logo

A lightweight table-of-content generator for Markdown

Table of content

About

Written in shell script, POSIX-compliant table of content (TOC for short) generator.

NOTE: This page's table of content was also made by this script.

Short story

I needed a TOC generator so I made one myself.
THE END

It's short, innit? 😏

Installing

For now, the only way is cloning the repository to your local machine.

Get the whole git tree.

git clone https://github.com/Adamocho/smalltoc.git ~/.local/smalltoc

Get the latest code only (git shallow clone) - less disk space.

git clone --depth 1 https://github.com/Adamocho/smalltoc.git ~/.local/smalltoc

Now cd inside and install it.

./smalltoc.sh install

This script may need execute permission.
In that case use: [sudo] chmod +x FILENAME

Uninstalling

Simply use uninstall

smalltoc uninstall

NOTE: This command DOES NOT remove the files from one's computer. It only deletes this script from /usr/bin/ directory. If one wishes to remove the files entirely, delete the git repository (with uninstalling done first).

Usage

Usage is very straightforward. Just give it file(s) to generate TOC for.

smalltoc FILE_1 FILE_2 FILE_3 [...]
# OR
smalltoc [OPTION]

It saves them in the $HOME/.cache/smalltoc directory.

Sample output

[...]
Generating TOC for ~/Documents/sample_readme.md
The file is saved in ~/.cache/smalltoc/README.md

Getting help

Use it either without arguments or with -h | --help flags.

About

Table of content generator for Markdown

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages