Journal updates with weather types and conditional questions
In case you missed it, I recently released Journal, a CLI for keeping a journal with structured data that can be queried and analyzed. An update is live with a couple of nifty new features.
First, instead of just a type of weather
for a question (which inserts the current condition and daily forecast), you can now specify sub-types of weather.current
and/or weather.forecast
. This outputs separate data entries to the JSON, and creates individual answers in the Markdown/Day One versions. You can still just use weather
as the type to insert all data.
Second, you can now apply conditions to questions to determine whether they’ll be asked or not when creating an entry. Right now only time-based conditions are implemented, but I plan to add some functionality around basing a question’s appearance on the answer to a previous question, like “if health rating is less than 5, display the health notes question.” But for now you can add condition: before noon
or condition: > 2pm
to any question or section to only display the question(s) at certain times of day.
I needed these conditions because I like to create a mood entry in the morning with data about sleep and coffee, and in the evening I don’t want to repeat that data, but do want to ask some different questions about how the day went. I could create two separate journals for these, but this way I can compile all of my data in one file. Questions that are skipped get a null entry in the JSON, so when I’m parsing I just test for nil and skip entries that don’t contain the information I’m trying to output. Unanswered questions don’t get added to the Markdown/Day One entries at all.
This release includes a couple of bug fixes as well. I recently removed the requirement for the gum
CLI, if it doesn’t exist it will now just use Readline for input. When using the gum
inputs, you can’t CTRL-c to cancel an entry, which I’m trying to figure out a way around right now.
Update using gem install journal-cli
. Visit the project page for more info and installation instructions.