Skip to content

Command line tool written in Go for printing cheat sheets from a Markdown document

License

Notifications You must be signed in to change notification settings

ninckblokje/csheet

Repository files navigation

csheet

This is a small app written in Go (my first Go app) for reading code cheat sheets from a Markdown document. csheet is licensed under the BSD-2-Clause.

Cheat sheet

By default csheet.md from the users home directory is read, but it is possible to specify a custom file using -f.

Cheat sheets follow the following structuur:

# csheet

## subject

### section

````
Stuff to remember
````

csheet will print the content enclosed by four backticks.

Get single section

Retrieve a single section:

$ csheet subject section
Stuff to remember

List all subjects and sections

To get all the subjects and sections, use -l:

$ csheet -l
subject section

Other options

You can specify the file using -f

$ csheet -f csheet.md subject section
Stuff to remember

Results can be copied directory to the clipboard using -c (install xclip for this to work):

$ csheet -c subject section
Stuff to remember

Or combined with -q output can be suppressed on the command line.

$ csheet -q -c subject section

The version can be printed using -v:

$ csheet -v
csheet version 1.4, revision 7da242a
See: https://github.com/ninckblokje/csheet

Help can be printed with -h:

$ csheet -h
Usage of csheet:
  -c    Copy result to clipboard
  -e    Open editor using $EDITOR
  -f string
        Cheat sheet Markdown file
  -h    Print help
  -l    Show all possible entries
  -q    No output
  -v    Display version

The options f can be combined with -e, -q or -c.

About

Command line tool written in Go for printing cheat sheets from a Markdown document

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages