What’s the weather like in …? Just cURL it!

wttr-in

To know what the weather is like in a specific (or in the current city) I always Google for “{cityname} weather forecast”. Thanks to wttr.in I can now also get to know that via cURL. Just send a cURL request to the URL and voila:

$ curl wttr.in
Weather for City: Sint-Amandsberg, Belgium

     \   /     Sunny
      .-.      5 – 8 °C       
   ― (   ) ―   ↙ 15 km/h      
      `-’      10 km          
     /   \     0.0 mm   

You can also append the name of a specific city to the domain:

$ curl wttr.in/paris
Weather for City: Paris, France

    \  /       Partly cloudy
  _ /"".-.     6 – 9 °C       
    \_(   ).   ↙ 17 km/h      
    /(___(__)  10 km          
               0.0 mm     

Since it’s curlable, it’s on the web (ref). Ergo you can also visit wttr.in in your browser.

The actual fetching of the weather data is done by wego, a weather client for the terminal.

wttr.in →
wttr.in Source (GitHub) →
wego Source (GitHub) →

(via)

Elsewhere , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.