Skip to content

stakiran/intoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intoc

TOC generator for Markdown.

⚠️ This intoc is new version based on golang. The old python based version is here.

Feature

  • Golang based.
  • No WebAPI use.
  • Multiple output ways.
    • Output to the stdout
    • Direct Update(Inserting TOC to the next of <!-- toc --> line directly).
  • Support sections written in Japanese.

How to use

$ intoc -input (Target-Markdown-File)

Create an alias if needed.

Usage

$ intoc -input readme.md -edit

$ type readme.md
# intoc

TOC generator for Markdown.

<!-- toc -->
- [intoc](#intoc)
  - [Feature](#feature)
  - [How to use](#how-to-use)
    - [Usage](#usage)
  - [Samples](#samples)
    - [Basic](#basic)
    - [Depth control](#depth-control)
    - [Use not hyphen but asterisk](#use-not-hyphen-but-asterisk)
    - [Direct update](#direct-update)
    - [Plain enumeration](#plain-enumeration)
    - [No link format but keep list grammer](#no-link-format-but-keep-list-grammer)
  - [How to develop](#how-to-develop)
    - [Requirement](#requirement)
    - [How to run](#how-to-run)
    - [How to test](#how-to-test)
    - [How to build](#how-to-build)
  - [License](#license)
  - [Author](#author)

## Feature
...

If you want to change edit-string from default <!-- toc --> to an another, use -edit-target option.

Plain enumeration

-use-plain-enum.

$ intoc -input readme.md -use-plain-enum
intoc
Feature
How to use
Usage
Samples
Basic
Depth control
Use not hyphen but asterisk
Direct update
Plain enumeration
No link format but keep list grammer
How to develop
Requirement
How to run
How to test
How to build
License
Author

No link format but keep list grammer

-no-linkformat.

$ intoc -input readme.md -no-linkformat
- intoc
  - Feature
  - How to use
    - Usage
  - Samples
    - Basic
    - Depth control
    - Use not hyphen but asterisk
    - Direct update
    - Plain enumeration
    - No link format but keep list grammer
  - How to develop
    - Requirement
    - How to run
    - How to test
    - How to build
  - License
  - Author

How to develop

Requirement

  • Golang
    • Developed and Tested on go version go1.10.3 windows/386 and go version go1.10.3 windows/amd64
  • github.com/stretchr/testify/assert for unittest

How to run

See run.bat, but executing go run simply.

How to test

See test.bat, but executing go test simply.

How to build

See build.bat, but executing go build simply.

License

MIT License

Author

stakiran

About

TOC generator for Markdown.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published