Notes Script

I am trying to reduce friction for some things like I don’t do that I would really like to do. For example taking digital notes when I think of things rather than acting upon them right away or just forgetting about it.

I create a script that would create new notes files for me.



if [ ! -d $NOTE_HOME ]; then
    mkdir $NOTE_HOME

# Define the filename
CURRENT_DATE=$(date "+%Y-%m-%d-%H-%M-%S")
CURRENT_DATE_STRING=$(date "+%Y-%m-%d %H:%M:%S")

# Touch the file (create it if it doesn't exist)
if [ ! -f $FILEPATH ]; then
    printf "# Note ${CURRENT_DATE_STRING}\n\n" > $FILEPATH

# Output the path

Then I created a bash function in my profile to open the newly created file.

note () {
    open $(~/bin/create-note);

I also added a new workflow to Alfred so I can hit Option+Space type “note” and hit enter. And then works no matter where I am in the OS.

Now if I want to find a note I will just use Spotlight to search for what I am looking for.