Added on April 26, 2010, 12:59 am
QUOTE(joker_invisible87 @ Feb 19 2010, 02:19 PM)
Here you go =)
Hours: date +"%H"
Minutes: date +"%M"
Dates: date +%d
Days: date +%A
Weather Condition, °C: curl --silent "http://xml.weather.yahoo.com/forecastrss?p=MYXX0006&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
Weather Picture (shell): curl --silent "http://weather.yahoo.com/malaysia/selangor/klang-1154726/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\
Weather Picture (image): file:///tmp/weather.png
ps: replace MYXX0006 and weather address with your own city code and address...
That's all i guess, have fun with geektool!
Cheers!
the weather condition paste it at shell command there? and how do i get the city code?Hours: date +"%H"
Minutes: date +"%M"
Dates: date +%d
Days: date +%A
Weather Condition, °C: curl --silent "http://xml.weather.yahoo.com/forecastrss?p=MYXX0006&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
Weather Picture (shell): curl --silent "http://weather.yahoo.com/malaysia/selangor/klang-1154726/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\
Weather Picture (image): file:///tmp/weather.png
ps: replace MYXX0006 and weather address with your own city code and address...
That's all i guess, have fun with geektool!
Cheers!
This post has been edited by jonrwg: Apr 26 2010, 12:59 AM
Apr 26 2010, 12:38 AM

Quote

0.0354sec
0.76
7 queries
GZIP Disabled