grizzcli
grizzcli is a command line tool to work with templates and the bear mac app.
Installation
npm install grizzcli --global
or just download or clone the repository and execute
npm install . --global
Usage
To create a new note from a template just type
grizzcli new <template-name>
or
grizzcli <template-name>
Configuration
grizzcli is looking for templates in the ~/.bear-templates
directory. All templates have to be .md
markdown or .hbs
handlebars files.
Placeholders
Additionally to the normal markdown markup it is possible to use some placeholders which can be used with {{ }}
syntax.
E.g.
# Today is {{weekday}}
Default Placeholders
The following placeholders are supported:
- day with leading zero (e.g. 24 or 03)
- month with leading zero (e.g. 12, or 01)
- monthName (e.g. Dezember (it's german for now))
- year (e.g. 1990)
- hour (e.g. 9)
- minute (e.g. 1)
- seconds (e.g. 20)
- weekday (e.g. Montag (it's german for now))
Custom Placeholders
There is also the possibility to add custom placeholders to templates. By adding the placeholders in the following form
grizzcli new ticket --id 1234
it is possible to use {{id}}
in the ticket.md
template. To use multi-word values for the placeholder it is neccessary to use quotation marks (e.g. --id "my id"
). It is also possible to overwrite default placeholders with this technique. So if it is neccessary to use english weekdays use
grizzcli new diary --weekday Monday