Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.
thanks!




With the lynx/weather script, how do i display the city which the temp is displaying.

I used two codes, the first is the actual temperature, and the second is the condition (ex. cloudy.) Replace "ZIPCODE" in the code with your own zip code:)

Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=ZIPCODE|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'

Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=ZIPCODE|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'
 
Actually I was looking to display the name of the city that the weather "geek' was looking up. e.g Melbourne or London .......:)
 
tweaked.

pictures make me happy.
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    1.1 MB · Views: 3,548
Yep and without actually typing it in yourself of course.

Do you mean not typing it in Geektool?

Anyway, I would use an image editor such as photoshop (if u have it. Also, Preview may even be able to do it, but I'm not sure.) and write the text in the image editor. Then it would be "embedded" in the wallpaper. (It WON'T be part of Geektool) Then you just use Geektool to put in the weather and condition.
 
Nice wallpaper, where'd you get it?

Also, whats your HD script? I like that, but I like it even more if it can do networkvolumes.

Wallpaper is from interfacelift here.

Script is

df -h | grep disk0s2 | awk '{print "Macintosh HD:", $4, "remaining"}'

change disk0s2 accordingly, and you can add in $2 for total space, and $3 for used space.
 
Do you mean not typing it in Geektool?

Anyway, I would use an image editor such as photoshop (if u have it. Also, Preview may even be able to do it, but I'm not sure.) and write the text in the image editor. Then it would be "embedded" in the wallpaper. (It WON'T be part of Geektool) Then you just use Geektool to put in the weather and condition.

I've managed to get the geektool code to pick up the weather location from the wunderground.
:D
Code:
lynx -dump  http://printer.wunderground.com/global/stations/94576.html|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }''/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }''/Observed/{for (i=3; i<=3; i++) printf $3 " " }'
 
Works great! You think you can write something similar to show temperature so we don't need lynx?

yeah, here's my temperature script (again, you'll have to adjust it for your city by browsing for your city's station (not zip code) here: http://m.wund.com/):

curl http://m.wund.com/global/stations/71892.html |sed -n '21p' | sed -e 's/<span class="nowrap"><b>//g' | sed -e 's/<\/b.*/C/g'

and here's my weather description (e.g. "partly cloudy"):

curl http://m.wund.com/global/stations/71892.html | grep '<td><b>' | tail -6 | head -1 | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'

basically, it just scrapes this page for the information you want:
http://m.wund.com/global/stations/71892.html

i use the same process for scraping headlines from a bunch of blogs that i'm interested in, and posting my dropbox feed. here's a pic of my desktop (let me know if you want scripts for any of the other stuff)
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    861.1 KB · Views: 1,341
Anyone care to help?

Got up this morning and it seems GeekTool/Lynx is having a bit of an issue with the temperature from Wunderground. Usually it displays with one decimal place, but now that there isn't one, it's show a "T" after the Fahrenheit "F". You can see the picture for what I'm talking about.

Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=38103|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'

That's the code from it and ANY help would be appreciated! (I don't know coding at all.

Thanks!
 

Attachments

  • Picture 1.png
    Picture 1.png
    48.4 KB · Views: 15,352
I know this isn't really a script, but since there are a few members who have the Mirage dock with the Kobhens icons I thought I'd post this.

I've been using PS to add the bar along the bottom to simulate the dock background going widescreen. However, it occurred to me it can be done with Geektool even easier. "Geektool bar" ill. No. 1

No more modifying every wallpaper to make it fit your dock! And you can very easily adjust the opacity depending on the brightness of the wallpaper in question.

I give you this screenshot to illustrate the simplicity with which you can accomplish this: (depending on your screen size, play around with the measurements in the lower right corner). Leave the "Command", "Test" and "Icon" tabs at the default settings..

Hi, I'm new to this forum but i was wondering how to make the dock. I don't quite understand. Because your link is down. :) please help.
 
I don't know what's happening, but is anyone else having problems with getting the weather to work today? I had it working fine the past few days, then suddenly it's gone and I can only see some text that's cut off so I don't know what it says. I go into GeekTool, disable the weather and re-enable it, and suddenly GeekTool is taking up almost 100% of my processor. Time and date are working fine, but weather just won't work at all. Even tried restarting my Mac and same problem. Anyone else? Fixes?
 
I don't know what's happening, but is anyone else having problems with getting the weather to work today? I had it working fine the past few days, then suddenly it's gone and I can only see some text that's cut off so I don't know what it says. I go into GeekTool, disable the weather and re-enable it, and suddenly GeekTool is taking up almost 100% of my processor. Time and date are working fine, but weather just won't work at all. Even tried restarting my Mac and same problem. Anyone else? Fixes?

No problems here :eek:

geek.png


Woof, Woof - Dawg
pawprint.gif
 
No problems here :eek:

geek.png


Woof, Woof - Dawg
pawprint.gif

Arg, then what's my problem? I've been trying to figure it out, and nothing seems to be fixing it. I've changed scripts, zip codes, restarted, everything I can think of. Nothing seems to be working.

EDIT: Sorry, it's been fixed. Don't know why I didn't try it before, but I had to delete and recreate the entries for temp and condition all over again. But it works now.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.