1.2.3 • Published 7 years ago

make-toc v1.2.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

make-toc.sh

npm version

A Shell script to automatically generate a Table of Contents from Markdown files.

Contents

Installation

NPM

npm install -g make-toc

Manually

  1. Clone the repo or download as a ZIP and extract it.
  2. Add the markdown file you want to generate a ToC for to the project's folder.

Usage

NPM

make-toc ...opts source-file.md output-file.md

Manually

. ./make-toc.sh ...opts source-file.md output-file.md

Documentation

  • source-file.md - The markdown file a ToC should be generated for.
  • output-file.md - A filename to label the script's output, e.g. toc.md.

...opts

This section outlines flags for the script which may be used individually or in combination.

-s <n> or --skip <n>

Skips n headers from the top of the file.

For example, to omit the file's title header use:

make-toc -s 1 source.md target.md

-d <n> or --depth <n>

Sets the maximum depth for the table.

For example, to generate a fairly shallow table of the top-level and second-level headers only, use:

make-toc -d 2 source.md target.md

Passing -d 0 to the script will result in default behaviour, i.e. full depth.

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5-docs

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago