# URLs to the National Weather Service data for Minnesota.
iwin_url = 'http://iwin.nws.noaa.gov/iwin/'
watch_url = '/watches.html'
warn_url = '/allwarnings.html'
urls = []
to
# URLs to the National Weather Service data for Minnesota.
iwin_url = 'http://www.weather.gov/view/prodsByState.php?state='
watch_url = '&prodtype=watches'
warn_url = '&prodtype=warnings'
urls = []
That doesn't work for me. Does anyone have any suggestions. This is a great program. NWS broke it!
Now that NOAA uses the CAP format and xml for alerts, you really wont need to manually parse html for weather data. You can use xmlstarlet to get what you need. For example:
curl -s "http://www.weather.gov/alerts/in.cap" | xml sel -T -N cap="http://www.incident.com/cap/1.0" -t -m "//cap:info" -v "concat(cap:category,'|',cap:event,'|',cap:urgency,'|',cap:severity,'|',cap:certainty,'|',cap:effective,'|',cap:expires,'|',cap:headline,'|',cap:web,'|',cap:area,'|',cap:description)" -n |tr "\n" " " | tr "$" "\n" | sed /^$/d | grep 18183 | awk -F "|" '{print $0}' | sed 's/^[ \t]*//'
will give you a | delimited line with all the weather info you need for Indiana gecode 18183. Pick the info you need by changing the value in the awk print statement and send it to any messaging device you want.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well it looks like StormSiren is broken, is any one going to pick this project up again? I love the app and the scripts fail on the .cap items for the Colorado area (I even tried TX and it failed there too)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The IWIN website StormSiren uses to obtain data is gone. I would guess the new site is similar to:
http://www.weather.gov/view/prodsByState.php?state=CT&prodtype=warnings
I don't know Python, but I tried changing:
# URLs to the National Weather Service data for Minnesota.
iwin_url = 'http://iwin.nws.noaa.gov/iwin/'
watch_url = '/watches.html'
warn_url = '/allwarnings.html'
urls = []
to
# URLs to the National Weather Service data for Minnesota.
iwin_url = 'http://www.weather.gov/view/prodsByState.php?state='
watch_url = '&prodtype=watches'
warn_url = '&prodtype=warnings'
urls = []
That doesn't work for me. Does anyone have any suggestions. This is a great program. NWS broke it!
Geoff Fox
me@geofffox.com
http://www.geofffox.com
Now that NOAA uses the CAP format and xml for alerts, you really wont need to manually parse html for weather data. You can use xmlstarlet to get what you need. For example:
curl -s "http://www.weather.gov/alerts/in.cap" | xml sel -T -N cap="http://www.incident.com/cap/1.0" -t -m "//cap:info" -v "concat(cap:category,'|',cap:event,'|',cap:urgency,'|',cap:severity,'|',cap:certainty,'|',cap:effective,'|',cap:expires,'|',cap:headline,'|',cap:web,'|',cap:area,'|',cap:description)" -n |tr "\n" " " | tr "$" "\n" | sed /^$/d | grep 18183 | awk -F "|" '{print $0}' | sed 's/^[ \t]*//'
will give you a | delimited line with all the weather info you need for Indiana gecode 18183. Pick the info you need by changing the value in the awk print statement and send it to any messaging device you want.
Even better, StormSiren has been rewritten to handle the CAP format!
Well it looks like StormSiren is broken, is any one going to pick this project up again? I love the app and the scripts fail on the .cap items for the Colorado area (I even tried TX and it failed there too)