https://github.com/poneding/gitbook-summary-generator
Gitbook Summary Generator is a tool that automatically generates Gitbook SUMMARY.md.
https://github.com/poneding/gitbook-summary-generator
Last synced: 11 months ago
JSON representation
Gitbook Summary Generator is a tool that automatically generates Gitbook SUMMARY.md.
- Host: GitHub
- URL: https://github.com/poneding/gitbook-summary-generator
- Owner: poneding
- License: apache-2.0
- Created: 2023-05-23T01:30:23.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-07T09:33:41.000Z (almost 3 years ago)
- Last Synced: 2025-01-11T05:47:17.232Z (over 1 year ago)
- Language: Go
- Homepage: http://poneding.com/gitbook-summary-generator/
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitbook-summary-generator
English | [中文](./README_zh.md)
`gitbook-summary-generator` is a tool that automatically generates Gitbook SUMMARY.md.
## Download
```bash
go install github.com/poneding/gitbook-summary-generator@latest
```
## Usage
### View help information
```bash
$ gitbook-summary-generator -h
gitbook-summary-generator is a tool to generate summary from Gitbook context files. version: v1.1.0
Usage:
gitbook-summary-generator [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
start Start to generate summary from Gitbook context files
version Version
Flags:
-h, --help help for gitbook-summary-generator
-t, --toggle Help message for toggle
Use "gitbook-summary-generator [command] --help" for more information about a command.
$ gitbook-summary-generator start -h
Start to generate summary from Gitbook context files.
Usage:
gitbook-summary-generator start [flags]
Flags:
-d, --dir string Gitbook directory (default ".")
-f, --force Force update summary file.
-h, --help help for start
--ignored-dirs strings Ignore directories, multiple directories seperated by comma.
--readme-title string Gitbook readme title
--summary-file string Gitbook summary file (default "./SUMMARY.md")
--summary-title string Gitbook summary title
```
### Command auto-completion
```bash
# bash
source <(gitbook-summary-generator completion bash)
# zsh
source <(gitbook-summary-generator completion zsh)
```
### View version
```bash
gitbook-summary-generator version
```
### Generate SUMMARY
```bash
gitbook-summary-generator start -f
```
Arguments description:
1. Use `-f` or `--force` to force an update of the SUMMARY.md. When the file does not exist, it is generated directly by default, and when the file exists, it is not updated by default;
2. Use `-d` or `--dir` to specify the read directory, and the current directory is read by default;
3. Use `-summary-file` to specify the Summary generated file, and 1 is generated in the current directory by default;
4. Use `-readme-title` to specify the Summary file title, which defaults to reading the directory name;
5. Use `-summary-title` to specify the Readme file title, which defaults to reading directory names;
6. Use `-ignored-dirs` to specify ignored directories, and multiple directories to separate by `,` .
```bash
gitbook-summary-generator start -f \
-d ./Notes \
--summary-file ./Notes/SUMMARY.md \
--summary-title Notes \
--readme-title Notes \
--ignored-dirs draft,tmp
```