Local weather reports from the commandline
Download/view
weather_for.pl is a simple commandline tool to get the weather for your town or city. It uses the OpenWeatherMap API to fetch the weather. You give it a city name and an optional longitude/latitide pair (to help disambiguate cities with the same name), and it gives you the latest weather. Simples.
Here are a couple of examples of weather_for.pl in action$ ./weather_for.pl kinshasa
================================================================
Weather for Kinshasa (lat:-4.32, long:15.32)
http://openstreetmap.org/?zoom=13&lat=-4.32&lon=15.32
----------------------------------------------------------------
Date: Wed Oct 17 23:19:37 2012
Temperature: 25.49â°C (max: 25.85â°C, min: 24.85â°C)
Air pressure: 977 kPa
Wind: 2 mps, 1 degrees
Humidity: 89%
Cloud cover: 80%
Rain: 1 (3h)
================================================================
$ ./weather_for.pl oxford 51 -1
================================================================
Weather for Oxford (lat:51.75, long:-1.26)
http://openstreetmap.org/?zoom=13&lat=51.75&lon=-1.26
----------------------------------------------------------------
Date: Wed Oct 17 23:18:15 2012
Temperature: 11.64â°C (max: 11.85â°C, min: 10.85â°C)
Air pressure: 996 kPa
Wind: 0 mps, 3 degrees
Humidity: 97%
Cloud cover: 67%
Rain: 6 (3h)
================================================================