wed
's idea is to automate something I do pretty often: once I register for a run or triathlon event, I frequently check the city's weather forecast for the race's date and time in the previous days.
With cargo
installed:
$ cargo install --path .
wed
and its sub-commands that output weather information accept the options --units
, --json
and --verbose
before the subcommand (e.g. wed --json
or wed --json forecast "Ottawa, ON" "2022-07-09 09:00"
).
Try wed --help
for details.
Run wed forecast
with two arguments:
$ wed forecast "Ottawa, ON" "2022-07-09 09:00"
🌤 26°C (feels like 27°C) ☔ 40% chance of rain & 10% humidity 💨 4.2 km/h W
Or with a JSON output:
$ wed --json forecast "Ottawa, ON" "2022-07-09 09:00"
{
"name": null,
"location": "Ottawa, CA",
"units": "Metric",
"icon": "\u26c5",
"date": "2023-05-28 07:00:00",
"weather_code": 3,
"probability_of_precipitation": 13,
"temperature": 17.4,
"feels_like": 17.8,
"humidity": 90,
"wind_speed": 10.8,
"wind_direction": 244
}
Run wed save
with three arguments:
$ wed save "National Capital Triathlon" "Ottawa, ON" "2022-07-09 09:00"
🌤 26°C (feels like 27°C) ☔ 40% chance of rain & 10% humidity 💨 4.2 km/h W
Run wed
with no sub-command or arguments:
$ wed
🗓 National Capital Triathlon (Jul 7, 09:00) 🌐 Ottawa, ON, Canada
🌤 26°C (feels like 27°C) ☔ 40% chance of rain & 10% humidity 💨 4.2 km/h W
Or with a JSON output:
$ wed --json
[
{
"name": null,
"location": "Ottawa, CA",
"units": "Metric",
"icon": "\u26c5",
"date": "2023-05-28 07:00:00",
"weather_code": 3,
"probability_of_precipitation": 13,
"temperature": 17.4,
"feels_like": 17.8,
"humidity": 90,
"wind_speed": 10.8,
"wind_direction": 244
}
]
$ wed notify
Running this command on a non-macOS system will output the same information as wed --json notify
:
$ wed --json notify
{
"title": "🗓️ Formula Run (Jun 11, 09:00)",
"subtitle": "🌐 Ottawa, ON, Canada",
"body": "⛅ 18°C (feels like 17°C)\n☔ 0% chance of rain & 69% humidity\n💨 9km/h E"
}
Run wed delete
with one argument, the name of the event:
$ wed delete "National Capital Triathlon"
Run wed list
with no arguments.
- Conversion of location (city/country) to a latitude and longitude: Nominatin
- Weather forecast, only when t - 16 days: hourly from Open Meteo
- Saved events are saved in a simple file
~/.wed.json
- The app automatically deletes past events when the app is run
- The app ignores events that are more than 5 days ahead