---
title: Journal updates with weather types and conditional questions
date: 2023-09-20 09:46
slug: journal-updates-with-weather-types-and-conditional-questions
categories:
- Code
tags:
- journaling
- weather
- cli
- journal-cli
- markdown
- dayone
---

![Journal Screenshot](https://brettterpstra.com/uploads/2023/09/journal-header-rb.jpg)

[Journal]: https://brettterpstra.com/projects/journal-cli/ "Journal CLI"

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][Journal] for more info and installation instructions.

## Journal

Project: [Journal](https://brettterpstra.com/projects/journal-cli.md)

- [Historical weather for Journal CLI](https://brettterpstra.com/2023/09/30/historical-weather-for-journal-cli.md): 2023-09-30
- [Journal updates with weather types and conditional questions](https://brettterpstra.com/2023/09/20/journal-updates-with-weather-types-and-conditional-questions.md): 2023-09-20
- [Journal and integrations](https://brettterpstra.com/2023/09/11/journal-and-integrations.md): 2023-09-11
- [Important Journal CLI updates](https://brettterpstra.com/2023/09/07/important-journal-cli-updates.md): 2023-09-07
- [Journal, a CLI for journaling](https://brettterpstra.com/2023/09/06/journal-a-cli-for-journaling.md): 2023-09-06

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
