Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nchern/cap
A command line tool to parse and print out markdown-formatted files
https://github.com/nchern/cap
command-line command-line-tool unix
Last synced: 4 days ago
JSON representation
A command line tool to parse and print out markdown-formatted files
- Host: GitHub
- URL: https://github.com/nchern/cap
- Owner: nchern
- License: mit
- Created: 2020-05-21T13:55:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-05T01:13:09.000Z (about 3 years ago)
- Last Synced: 2024-11-21T04:56:07.908Z (2 months ago)
- Topics: command-line, command-line-tool, unix
- Language: Go
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Go Report Card](https://goreportcard.com/badge/github.com/nchern/cap)](https://goreportcard.com/report/github.com/nchern/cap)
[![Coverage](https://gocover.io/_badge/github.com/nchern/cap)](https://gocover.io/github.com/nchern/cap)# cap
A command line tool to parse markdown-like formatted texts into chapters and print selected chapters out> cap. - an abbreviation of capitulum ("chapter").
## Install
```bash
make install # You need go compiler set up.
```## Usage
```bash
$ cap -h
Usage: cap [FLAGS] [pattern]
-s If set, all sub-chapters of the matched chapters are also printed out. Subchapter is a chapter with headings of higher levels that the initial oneThis utility scans lines of a given text. If a line is a heading(e.g. '* Header 1'),
it checks whether it matches against given regex .
If it matches, the heading along with its contents(i.e. chapter) is printed out.
```