weather.py is a simple Python script that integrates the Weather Underground API with Notify My Android. It periodically polls WU and will send an NMA alert if it starts raining or snowing.
I work in a lab with no windows. In a part of the world where it can start raining unpredictably. So I wrote this script, which runs automatically when I log in. It will check for rain every five minutes and send me an alert. When I log out and leave the lab it stops checking.
Get API keys for Weather Underground and Notify My Android. Set those values in the top of the weather.py file.
python weather.py
And let it run.
There is a .plist file supplied, edit it to point to your copy of weather.py and save it in ~/Library/LaunchAgents/
. The script will automatically run at login.
Alternatively, add it as a login item.
Mozilla Public License 2
The original idea belongs to @angusi, I just cleaned it up.
Weather.py makes use of PyNMA.
John Heenan