Welcome to the Newschoolers forums! You may read the forums as a guest, however you must be a registered member to post. Register to become a member today!
For Forecast picture:
You will need 2 scripts, one in a Shell and one in an image
1. In the Shell you put:
curl --silent "http://ca.weather.yahoo.com/canada/ontario/toronto-4118/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\
Replace the toronto URL with the city of your choice. just go on yahoo weather and search ur city.
2. in the Image you put
file:///tmp/weather.png
And the image will pop up.
dont forget to change the refresh rate from 0 to.... 1? 100? whatever.
If you still cant get it, try with my exact scripts to make sure ur not getting the URLs wrong.
but its a hit n miss. if it does not work, try again the next day.
More Scripts i found.
More Scripts:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=CAXX0504&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>//'
curl --silent "http://weather.yahooapis.com/forecastrss?p=CAXX0504&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//' -e 's/, [0-9]* [A-Z]//' | tail -n1
curl "http://xml.weather.yahoo.com/forecastrss?p=CAXX0504&u=c" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/Hi\:\ \(.*\)\ Lo\:\ \(.*\)/\?Hi\: \1\ Lo\:\ \2/" | sed "s/\?\(.*\)/\\1/"
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=CAXX0504&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/[A-Z a-z]*, //' -e 's/\(.*\) F/\1 °F/' -e 's/\(.*\) C/\1 °C/' | sed 's/ //' | tail -n1
Try them all,
last one is the 2 day forcast.
Date and time
Type
Date +%B
and you can change the B to anything on ur keyboard and get different results. so you can get the clock, the date, the month, the hour, the second, the AM/PM the year etc just try them all XCVBNM are the bigger ones i think.
And dont forget to change your refresh rate once you make a shell.