🌤 Track the weather for event days releases.wed.fyi
0

Configure Feed

Select the types of activity you want to include in your feed.

Rust 97.7%
HTML 1.5%
Dockerfile 0.8%
141 1 6

Clone this repository

https://git.vm.fail/cuducos.me/wed https://git.vm.fail/did:plc:7xlu57kfbfaqqk2ifrdiunfs
ssh://git@knot1.tangled.sh:2222/cuducos.me/wed ssh://git@knot1.tangled.sh:2222/did:plc:7xlu57kfbfaqqk2ifrdiunfs

For self-hosted knots, clone URLs may differ based on your setup.


README.md

wed — Weather on the Event Day#

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.

Install#

You can download the binary for your platform from the releases page.

Example
$ curl -LO https://bucket.wed.fyi/v0.3.1/wed-x86_64-unknown-linux-gnu.tar.gz
$ tar -xzvf wed-x86_64-unknown-linux-gnu.tar.gz
$ rm wed-x86_64-unknown-linux-gnu.tar.gz
$ chmod a+x wed
$ mv wed /usr/local/bin/

Compile from source#

With cargo installed:

$ cargo install --path .

Use cases#

wed and its sub-commands that output weather information accept the options --units, --json, --chart 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.

Weather forecast for any location, date and time#

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
}

Save an event#

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

You can also use the --before and --after flags (in hours) to save a specific time window for the event. By default, it saves the forecast starting 1 hour before and ending 3 hours after the event:

$ wed save --before 2 --after 4 "National Capital Triathlon" "Ottawa, ON" "2022-07-09 09:00"

Weather forecast for saved events#

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 an hourly chart:

$ wed --chart
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
    }
]

You can also combine --chart and --json to add the hourly forecast to the output.

Desktop notifications#

wed can also trigger a desktop notification:

$ wed notify
Example notification: the title goes on the first line, the location is next, followed by temperature and feels like, precipitation and wind speed, one in each line.

If the notification fails or is not supported by the operating system, it 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"
}

Delete a saved event#

Run wed delete with one argument, the name of the event:

$ wed delete "National Capital Triathlon"

List all saved events#

Run wed list with no arguments.

Data#

Sources#

Persistence#

  • 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 16 days ahead when retrieving weather forecast