DEV Community

Cover image for stup - a shell tool for daily notes
Lazarus Lazaridis
Lazarus Lazaridis

Posted on • Updated on

stup - a shell tool for daily notes

Over the past few years I've been participating in Stand-up meetings and it took me some time to find a convenient and effective way for keeping notes about what I was doing every day.

I needed to be able to:

  • keep categorized notes on the issues I worked on, the meetings I participated in and stuff that blocked my work etc
  • easily access these notes based on their date
  • have an overview of what I did for example the last week
  • all of the above:
    • from inside a terminal
    • with the notes strictly bound to the date they are taken
    • without having to manually structure and update a single document
    • without having to manually create a document for each day

stup

I made this tool which actually is a bash script and I named it stup from the term stand-up.

stup demo

You can find the project on GitHub here.

Usage examples

Below are some examples showing the most important features of stup.

Adding notes

# Adding a note to the default category at current date
stup add -n "Worked on issue #ABC123"

# Adding a note to the default category setting the current date explicitly
stup add today -n "Worked on issue #ABC123"

# Adding a note to the meetings category
stup add today -c "meetings" -n "2 hours with @phoebe for the project kick off"

# Adding a note to the blocking category for April 10th, 2020
stup add @ 2020-04-10 -c "blocking" -n "connectivity issues"

Showing notes

# Showing yesterday's notes
$ stup

# Showing yesterday's notes explicitly setting the date
$ stup yesterday

# Showing today's notes
$ stup today

# Showing notes on a specific date
$ stup show @ 2020-04-18

# Showing notes on a specific date for the meetings category
$ stup show @ 2020-04-18 -c "meetings"

Retrieving all notes for a period of time

# List current week's notes
stup log week

# List current week's notes skipping command's literal
stup week

# List previous week's notes
stup log previous-week

# List notes between January 20th, 2020 and March 2nd, 2020
stup log --from 2020-01-20 --to 2020-03-02

# List meeting notes between January 20th, 2020 and March 2nd, 2020
stup log --from 2020-01-20 --to 2020-03-02 -c "meetings"

Behind the scenes

Notes are organized in categories.

When a new note is added, stup creates a markdown file and places it under the category's directory in a sub-directory with a path based on the date.

CATEGORIES_ROOT_DIRECTORY/CATEGORY/YEAR/MONTH/YYYY-MM-DD.md

# For example, the notes of a category named "programming" April 18th, 2020 are saved under
CATEGORIES_ROOT_DIRECTORY/programming/2020/04/2020-04-18.md

This allows users to retrieve any notes added on a specific date or in a specific period for a specific or for all categories.

# Fetch notes for all categories
$ stup show @ 2020-04-18

# Fetch notes for a specific category for previous week
$ stup log previous-week -c programming

# Fetch notes for all categories for a specific period
$ stup log --from 2020-04-01 --to 2020-04-15

You can find the full documentation with usage examples on the project's repository and more information about features to be added in the project's GitHub issues page.

Top comments (13)

Collapse
 
codemouse92 profile image
Jason C. McDonald

This is really neat. Well done!

Collapse
 
iridakos profile image
Lazarus Lazaridis

Thank you!

Collapse
 
j3ffjessie profile image
J3ffJessie

This is awesome. Really nice job. I’ll be setting this up for sure. Will help me keep track of what I have going on with my code and projects.

Collapse
 
iridakos profile image
Lazarus Lazaridis

Thank you, I hope you find it useful

Collapse
 
redfred7 profile image
Fred Heath • Edited

That's very useful! It removes dependency on desktop/web apps for simple note taking and I can have this running on both my Linux and MacOS machines. Thank you!

Collapse
 
iridakos profile image
Lazarus Lazaridis

Thank you Fred!

Collapse
 
rafaacioly profile image
Rafael Acioly

Love it!

Collapse
 
iridakos profile image
Lazarus Lazaridis

Thank you!

Collapse
 
kamillacrozara profile image
Kamilla Holanda Crozara

Awesome!

Collapse
 
iridakos profile image
Lazarus Lazaridis

Thank you!

Collapse
 
spencertweedy profile image
Spencer Tweedy

This is really cool. I'm currently working on a Rails app that does some similar things!

Collapse
 
iridakos profile image
Lazarus Lazaridis

Thank you

Collapse
 
tomgranot profile image
Tom Granot

Very, very dope. I keep a text file with hashtags and dates so I can cmd+f through them, but that's about as far as I got. This is on a whole other level.... great job!