A CLI tool to easily save, access and organize daily notes.
Usage
Add notes
To add a new note use the add command.
$ stup add @ yesterday -n "A note" -n "Another note"
The full version of the command:
stup add @|--at|-@ <when> -n|--note "<note text>" -c|--category "<category-name>"
where:
<when>: specifies in which date the notes should be added. Its value can be:
any of the words: today, tomorrow, yesterday in which case you can omit the @|--at|-@ option
a date string in the form: YYYY-MM-DD, for example: 2020-04-12
if you omit this option, stup by default will save the notes in the current date
<note-text>: the text of the note, for example: "Reviewed PR related to..."
-c or --category: is the category option (optional). If omitted, notes will be saved to your default category
<category-name>: the name of the category in which the notes will be added
Examples
Add a note for current date (all of the following commands are equivalent)
# Implying today (if you don't define the date, the add action defaults to current date) $ stup add -n "A new note" # Explicit with date alias 'today' omitting the `@` option $ stup add today -n "A new note" # Explicit with date alias 'today' $ stup add @ today -n "A new note" # Explicit without the 'today' alias (suppose the date is April 17th, 2020) $ stup add @ 2020-04-17 -n "A new note"
Add a note for yesterday
All of the following commands are equivalent.
# Explicit with date alias 'yesterday' $ stup add @ yesterday -n "A new note" # Explicit with date alias ommiting the `@` option $ stup add yesterday -n "A new note" # Explicit without alias (suppose the date is April 17th, 2020) $ stup add @ 2020-04-16 -n "A new note"
Add a note for tomorrow
All of the following commands are equivalent.
# Explicit with date alias 'tomorrow' $ stup add @ tomorrow -n "A new note" # Explicit with date alias omitting the `@` option $ stup add tomorrow -n "A new note" # Explicit without alias (suppose the date is April 17th, 2020) $ stup add @ 2020-04-18 -n "A new note"
Add two notes at once
$ stup add today -n "Reviewed PR ..." -n "Merged to master..."
Add to a non-default category
# Add a note to a category named 'blocking' $ stup add -c "blocking" -n "Can't continue unless"
Show notes
To view your notes on a given date, use the show command.
$ stup show
The full version of the command is:
$ stup show @ <when> -c|--category "<category-name>"
where:
@ or --at or -@: is the date option
<when>: specifies which date's notes should be shown. Its value can be:
any of the words: today, tomorrow, yesterday in which case you can omit the @ option
a date string in the form: YYYY-MM-DD, example: 2020-04-12
if you omit this option, stup by default will show you your yesterday's notes
<category-name>: the name of the category whose notes will be shown. You may omit this option if you want to see notes from all the categories.
If you don't specify a category and you have more than one, the default behaviour is to show notes only from the categories that have notes the specified day. If you prefer though to show the "empty" categories as well, you may use the --include-empty.
Notes:
the default action of stup is to show you your notes so you may write the command without the show directive (see the examples).
if you request to view your notes on a date that you haven't added anything, stup will ask if you want to see the notes of the latest date on which something was added before the one you specified. For example, if it is Monday and you didn't add any notes during the weekend, when you type stup yesterday you'll be prompted to see the notes added on Friday.
Examples
Show yesterday's notes
All of the following commands are equivalent.
# Imply "show" as action and "yesterday" alias as date $ stup # Imply "yesterday" as date $ stup show # Explicit date set to "yesterday" date alias $ stup yesterday # Explicit date (given that current date is April 17th, 2020) $ stup @ 2020-04-16
Show today's notes
All of the following commands are equivalent.
# Imply "show" as action $ stup today # Show today's notes for the category "meetings" $ stup today -c "meetings" # Show today's notes for the category "meetings" by explicitly setting action to "show" $ stup show today -c "meetings"
Show notes on a past date
# Show notes on April's Fool Day $ stup show @ 2020-04-01
Show notes of a specific category
# Show today's notes added in category "pull-requests" $ stup show today -n "pull-requests"