My Alfred Journaling Workflow

Me and my brain are in a constant conflict of: “Don’t worry I can remember THAT”, and “I forgot.” To combat this, I’ve been keeping a daily work journal of things that happen that day; things like servers crashing, config changes that were made, how to do some task or another..etc. It has come in very handy for when something happens in the middle of the night and you are oncall and you are able to quickly search for the last time something like this happened and a simple explanation on how you fixed it last time.

I was using a custom containerized webapp that connected to a s3 database to hold all this information, but decided that It might be easier to just store this information in a large text file to make it easier to search and edit.

The workflow I’ve come up with for this looks something like this:

In Alfred, you type just jrnl if you just want the journal to open, or you can type jrnl topic and it will create a template for a new journal entry and then open the file. I wanted the newest entry on top, so that took a little tom foolery to get that to happen (thus me running a shell script instead of using Alfred’s built in write to file):

echo "## {query}
$(date +"%Y-%m-%d:%H:%M")

$(cat workjrnl.jrnl)
" > workjrnl.jrnl

The format is markdown, but I gave it a jrnl extension so I could use vim snippets if I needed to in the future.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s