Automatically update SUMMARY.md of a GitBook repository.
自动输出 GitBook 仓库的 SUMMARY.md 文件.
Usage
$ python gitbook-auto-summary.py
- use argument
-o
to overwrite SUMMARY.md without checking.
- use argument
- input directory (it should be the root directory of a GitBook repo)
- 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)

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