Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Here's my Geektool folder. It’s in my Documents folder. I am using Brett Terpstra's script with my own enhancements. I don’t recall exactly where the icons came from - they were on DeviantArt somewhere. I had to rename them to match the Yahoo icon names.

Caveat Emptor, YMMV, etc, etc.
 

Attachments

  • Geektool.zip
    1.4 MB · Views: 139
weather underground image script

I have managed to get the current weather icon, temp and conditions from www.wunderground.com.

One improvement I'd like is to have the degree symbol place after the numerical temperature.

Here's what I did:
1.This copies the weather image to your HD. In a Geektool shell I put
Code:
 curl --silent "http://www.wunderground.com/q/zmw:00000.1.71623" | grep -E '(og:image)'  | sed -e 's/<meta property=\"og:image\" content=\"//' | sed -e 's/\" \/>//' | 
xargs curl --silent -o ///tmp/weather3.png\

2. This displays the wether image. In a Geektool image box I put:
Code:
 file://localhost/tmp/weather3.png

I set both to 300 second refresh rates.

3. For current weather conditions I put this in a Geektool shell box:
Code:
 curl --silent "http://www.wunderground.com/q/zmw:00000.1.71623" | grep -E '(og:title)' | sed -e 's/<meta property=\"og:title\" content=\"London, Ontario \| //' | sed -e 's/" \/>//' | sed 's/\° \|/C, /'

You can check out a screen shot of my 2006 iMac here. https://www.dropbox.com/s/gu8o30xoyhxyae4/Screen%20shot%202014-10-22%20at%205.34.17%20PM.png?dl=0
The background images change randomly every couple of minutes.

Hope this helps. If you see room for improvements and efficiency please let me know. Thanks.
 
Last edited:
After working for half a year, it has stopped working again
Help, Ivan!

Long time never use geektool till today!

The Yahoo's weather image source has been changed, you may try below (for Hong Kong as an example) or look for your own country weather URL from Yahoo weather website:
https://uk.weather.yahoo.com/hong-kong/state/hong-kong-2165352/

Or use below sample code (for Hong Kong as an example), note that the highlighted in RED, which is the only changes from the original code:
curl --silent "https://uk.weather.yahoo.com/hong-kong/state/hong-kong-2165352/" | grep "current-weather" | sed "s/.*background\:url(\'\(.*\)\') .*/\1/" | xargs curl --silent -o /tmp/weather1.png\

It should works for now till the image source has changed again.

Please ignore this post if you have already figured it out or doesn't need it anymore.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.