Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
What code have you tried?

I've tried these:
Code:
curl --silent "http://weather.yahoo.com/united-states/california/fullerton-2408095/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\
^Returns green feedback. (success)
+

Code:
file:/localhost/Users/tmp/

FIRST CODE EDITED.


The problem is the second. Can't figure it out.

I'm sorry if my problem is ridiculously easy or simple or something, I'm new to Geektools.
 
Last edited by a moderator:
It looks like the problem if you have the location to the weather icon set to "file:/localhost/Users/tmp/" which is a directory, not a file, and there are supposed to be two /'s. Either try "file://localhost/Users/tmp/weather.png" for your file location, or try this:

Shell command:
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USCA0127&u=f" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'

Shell command:
Code:
curl -o /tmp/weather.html http://weather.yahoo.com/united-states/california/fullerton-2408095/; curl -o /tmp/currenttemp.png  `grep "div\ class=\"forecast-icon\"\ style=\"background:url" /tmp/weather.html | awk -F"'" '{ printf $2 }'`

File location:
Code:
file://localhost/tmp/currenttemp.png
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.