cross-posted from: https://gekinzuku.com/post/394282

Lately I’ve been obsessed with moving everything that people typically use as widgets into my bashrc. Today I discovered wttr.in, which is an open source project on Github at https://github.com/chubin/wttr.in

Usage is almost trivial. To get weather in your terminal, simply curl the URL with your city after the forward slash. If you live in New York City, use
curl 'https://wttr.in/New%20York'

Now, if that’s too much bloat to have covering your precious terminal real estate, instead use
curl 'https://wttr.in/New%20York'?0?A?u which will truncate the curl to only today’s weather.

  • fernandu00
    link
    fedilink
    English
    81 year ago

    O stepped into this a couples days ago looking for a weather info to waybar and found this python script with wttr …with a couple tweaks and some documentation reading I got it to work really easily in Portuguese

      • fernandu00
        link
        fedilink
        English
        21 year ago

        Saw that just after tweaking the script to get the pt-br entry of the json object so I didn’t change to pt website