Geektool weather icon unix shell script for September 2013

Well, Yahoo! is going through a (frankly) much needed UI/UX update on all their sites, and that has stranded a few Geek Tool users who rely on Yahoo for awesome .png image weather icons.  Fret not, France to the rescue! (SAY WHAT?)

Yes, Yahoo! France still has our beloved weather icons that we can steal from (but for how long??).  Use the following unix command to grab the weather icon, and save to the /tmp folder.  Modify as you see fit of course:

curl –silent “http://fr.meteo.yahoo.com/united-states/california/aliso-viejo-12796580/” | grep “obs-current-weather” | sed “s/.*background\:url(\’\(.*\)\’) .*/\1/” | xargs curl –silent -o /tmp/weather.png

Enjoy!

And in the meantime, if anybody has a new source for great weather icons for the future (for when the French finally surrender to the new Yahoo! UI), drop a comment!  Thanks.

See my updated post for 2014.

Advertisements

8 thoughts on “Geektool weather icon unix shell script for September 2013

    1. WordPress is quoting the curl command strangely. Try this:

      curl –silent “http://fr.meteo.yahoo.com/united-states/california/aliso-viejo-12796580/” | grep “obs-current-weather” | sed “s/.*background\:url(\’\(.*\)\’) .*/\1/” | xargs curl –silent -o /tmp/weather.png

  1. I tried this but it can’t save the weather.png file in tmp folder! what’s wrong?
    curl –silent “http://weather.yahoo.com/united-states/california/aliso-viejo-12796580/” | grep “obs-current-weather” | sed “s/.*background\:url(\’\(.*\)\’) .*/\1/” | xargs curl –silent -o /tmp/weather.png

    1. You have the old URL there. Try the france one:

      curl –silent “http://fr.meteo.yahoo.com/united-states/california/aliso-viejo-12796580/” | grep “obs-current-weather” | sed “s/.*background\:url(\’\(.*\)\’) .*/\1/” | xargs curl –silent -o /tmp/weather.png

  2. I tried using the following but was not able to pull an image:

    curl –silent “https://fr.meteo.yahoo.com/united-states/connecticut/stamford-2498846/” | grep “obs-current-weather” | sed “s/.*background\:url(\’\(.*\)\’) .*/\1/” | xargs curl –silent -o /tmp/weather.png

    Does this go in the same command box that shows nothing but grabs the image? Does the image command box still read:

    file:///tmp/weather.png

    I’m sorry, I’m still new using Geektools as I haven’t changed my weather command since about 2012. I was missing the images and saw your post. My weather description shell box still works fine. I know this is a rather late reply.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s