Frank the Obscure 无名的弗兰克

GitBook auto summary

2015-07-20

GitBook auto summary

Automatically update SUMMARY.md of a GitBook repository.

自动输出 GitBook 仓库的 SUMMARY.md 文件.

Usage

  1. $ python gitbook-auto-summary.py
    • use argument -o to overwrite SUMMARY.md without checking.
  2. input directory (it should be the root directory of a GitBook repo)
  3. the auto summary file SUMMARY.md will be created in the same directory.

Tested with Python 3.4.3 in Windows 7 and OS 10.10

Examples

folder tree:

.
├── README.md  
├── SUMMARY.md  
├── md  
│   └── SUMMARY.md  
├── nomd  
└── os-and-os-path.md  

output SUMMARY.md:

# Summary
- [os-and-os-path](./os-and-os-path.md)
- [README](./README.md)
- md
  - [SUMMARY](md/SUMMARY.md)

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Similar Posts

Comments