diff --git a/CHANGELOG.md b/CHANGELOG.md index ccc9eee..6a70ebe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +### 1.0.30 + +2023-12-13 17:22 + +#### FIXED + +- Weather.moon detection + ### 1.0.29 2023-10-01 15:24 diff --git a/Gemfile.lock b/Gemfile.lock index 8ec5780..eb9c4ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - journal-cli (1.0.29) + journal-cli (1.0.30) chronic (~> 0.10, >= 0.10.2) tty-reader (~> 0.9, >= 0.9.0) tty-which (~> 0.5, >= 0.5.0) diff --git a/README.md b/README.md index 75923c2..bb25858 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,8 @@ This file contains a YAML definition of your journal. Each journal gets a top-le You can include weather data automatically by setting a question type to 'weather'. In order for this to work, you'll need to define `zip` and `weather_api` keys. `zip` is just your zip code, and `weather_api` is a key from WeatherAPI.com. Sign up [here](https://www.weatherapi.com/) for a free plan, and then visit the [profile page](https://www.weatherapi.com/my/) to see your API key at the top. +You can optionally set the key `temp_in:` to `f` or `c` to control what scale is used for temperatures. + If a question type is set to `weather.forecast`, only the predicted condition, high, and low will be included in the JSON data for the question. A full printout of hourly temps will be included in the Markdown/Day One output. If the question type is `weather.current`, only the current condition and temperature will be recorded to the JSON, and a string containing "[TEMP] and [CONDITION]" (e.g. "64 and Sunny") will be recorded to Markdown/Day One for the question. diff --git a/lib/journal-cli/checkin.rb b/lib/journal-cli/checkin.rb index e0d5109..9fc1ecc 100644 --- a/lib/journal-cli/checkin.rb +++ b/lib/journal-cli/checkin.rb @@ -138,6 +138,7 @@ def print_answer(prompt, type, key, data) case type when /^(weather|forecast|moon)/ header prompt + puts type @output << case type when /current$/ data[key].current diff --git a/lib/journal-cli/version.rb b/lib/journal-cli/version.rb index c1ac1a3..7036de1 100644 --- a/lib/journal-cli/version.rb +++ b/lib/journal-cli/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Journal - VERSION = '1.0.29' + VERSION = '1.0.30' end diff --git a/src/_README.md b/src/_README.md index 08ac939..f4cff89 100644 --- a/src/_README.md +++ b/src/_README.md @@ -55,6 +55,8 @@ This file contains a YAML definition of your journal. Each journal gets a top-le You can include weather data automatically by setting a question type to 'weather'. In order for this to work, you'll need to define `zip` and `weather_api` keys. `zip` is just your zip code, and `weather_api` is a key from WeatherAPI.com. Sign up [here](https://www.weatherapi.com/) for a free plan, and then visit the [profile page](https://www.weatherapi.com/my/) to see your API key at the top. +You can optionally set the key `temp_in:` to `f` or `c` to control what scale is used for temperatures. + If a question type is set to `weather.forecast`, only the predicted condition, high, and low will be included in the JSON data for the question. A full printout of hourly temps will be included in the Markdown/Day One output. If the question type is `weather.current`, only the current condition and temperature will be recorded to the JSON, and a string containing "[TEMP] and [CONDITION]" (e.g. "64 and Sunny") will be recorded to Markdown/Day One for the question.