Originally Posted by
carterx
From what i can see, Yahoo has rearranged their website... so the URL (and/or tags) that the script tries to load and process aren't what they used to be (when the script was originally written in 2008). That makes the 'image' portion of the script fail.
This text part still seems to work...
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=CAXX0301&u=c" |
grep -E '(Current Conditions:|C<BR)' |sed -e 's/Current Conditions://' \
-e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' \
-e 's/<description>//' -e 's/<\/description>//' |tail -n1
Cloudy, 0 C
IOW, this isn't so much a geektool issue or a shell script issue as it's simply a case of an outdated web link (or a redesigned web page). Maybe there are some newer geeklets posted somewhere... or if someone wants to take the time, they could repair the links/tags used to grab the image. Here is the
faulty version:
curl --silent "http://weather.yahoo.com/forecast/CAXX0301.html" |
grep "forecast-icon" |sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" |
xargs curl --silent -o /tmp/weather.png
[i seem to remember seeing an AppleScript that would grab an animated gif of the latest radar imagery from
http://www.weather.com, but i don't recall where that was. i'm not all that familiar with
curl, otherwise i'd pop off a quick attempt right now.]