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.
i keep having this problem with the weather script on the top of the 11th page. it works fine but instead of just the weather i get "51.4*F Temperaturesremaining" and idk what i need to do to get rid of that.


any ideas. thanks.
 
How do i make it look fancy like those on the first post? Because at the minute mine just looks like this:

06
March
Friday
04:34

all I can change is that font and the colour of the whole thing, what If I want a specific part a certain size and colour?

EDIT: Never mind i've figured it out!
 
I dont understand what im supposed to do with the code in the OP for example, the temperature:

I created a "new entry", made it a "shell", in the "command" box, i plunked in:

lynx -dump http://printer.wunderground.com/cgi-...90210|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'

Also, i have lynx installed on my computer.
What else am I supposed to do?
 
I dont understand what im supposed to do with the code in the OP for example, the temperature:

I created a "new entry", made it a "shell", in the "command" box, i plunked in:

lynx -dump http://printer.wunderground.com/cgi-...90210|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'

Also, i have lynx installed on my computer.
What else am I supposed to do?

At least get to bottom of the first page. The forum automatically shortens the URL with "...". Go to the next page to find the code with the unshortened URL or just right click and copy link to get the full link.
 
Help for a newbie

Hi
I've spent several hours trying to get the weather to work using geektool. I have two main problems:
- I'm unable to get the weather in degrees celsius (i keep getting fahrenheit)
code = lynx -dump http://printer.wunderground.com/auto/printer/global/stations/94868|head -n 7|tail -n 1|awk '{print $2 $3}'

- and i'm unable to get the conditions at all

I've had to change the link to get (as the world url is different to those in teh US), but the weather that is being displayed is correct for my city (Melbourne, Australia)

Any help would be most appreciated!

Edit: I've tried every code for both temperature and conditions in this thread and this is the best i've managed

Here is a thumbnail of what i've managed so far
 

Attachments

  • geektool.png
    geektool.png
    112.2 KB · Views: 227
Anyone have a Script for showing the Total Ram Used? I Can only find it as part of the Uptime/CPU/Ram, and i've already got the Total CPU% Used, and i want the Total Ram Used aswell, so i can see what the system is upto.

Apologies if its in the thread, i scanned through.
 
Hi
I've spent several hours trying to get the weather to work using geektool. I have two main problems:
- I'm unable to get the weather in degrees celsius (i keep getting fahrenheit)
code = lynx -dump http://printer.wunderground.com/auto/printer/global/stations/94868|head -n 7|tail -n 1|awk '{print $2 $3}'

- and i'm unable to get the conditions at all


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

and this:
curl http://m.wund.com/global/stations/94868.html |sed -n '47p' | sed -e 's/<span class="nowrap"><b>//g' | sed -e 's/<\/b.*//g' | sed 's/\<td><b>//g'
 
Thanks

Thanks for the help zzzzzzzzz, the conditions code is working perfectly and the temp code is grabbing the correct temperature (in degrees celsius) from the site, but is not displaying the degrees celsius symbol.

Should I give up and just add the degrees celsius symbol onto the wallpaper using gimp or does anyone have any ideas?

Thanks
 
Ok. Here is what I like after some tweeks.
I finally got the iTunes script to display the art and current info. Weird thing is I have to open script editor and kick off the artwork script to get the album art to show. I shut script editor down and geektool takes over. It runs smooth after that.
Using Modern No. 20 font for date and weather and using Helvetica Neu for the album info.
Geekupdate.png
I have to manually start my script too, but then it stays on the album art work that it was on when i ran the script. In other words it is not rolling to the next artwork. Anyone have any ideas how I can fix this? Cheers!
 
Hmm, how do you get the time to display (12-hour clock) without the 0 at the beginning?

I've got:

date +%I:%M

But this shows the 0 for times 01-09.
 
I'm on a mbp. No problems setting the clock and iTunes scripts, but geektools hogs my cpu, when I have it running the battery goes quick..

using the top command, geektool is always on 'top' usually around 22%

any tips?

anyone else have this experience? any help?

my desktop btw:

3337627245_6cc90dc252_b.jpg
 
Thanks for the help zzzzzzzzz, the conditions code is working perfectly and the temp code is grabbing the correct temperature (in degrees celsius) from the site, but is not displaying the degrees celsius symbol.

Should I give up and just add the degrees celsius symbol onto the wallpaper using gimp or does anyone have any ideas?

Thanks

Yeah, I have that problem too. It's because the degree symbol is read as gibberish.The closest I can come to is either this:
curl http://m.wund.com/global/stations/71892.html |sed -n '21p' | sed -e 's/<span class="nowrap"><b>//g' | sed -e 's/<\/b.*//g' | sed 's/^/°C/' | sed '/\n/!G;s/\(.\)\(.*\n\)/&\2\1/;//D;s/.//' | sed -e 's/ //g'

or this:
curl http://m.wund.com/global/stations/71892.html |sed -n '21p' | sed -e 's/<span class="nowrap"><b>//g' | sed -e 's/<\/b.*//g' | sed 's/^/C°/' | sed '/\n/!G;s/\(.\)\(.*\n\)/&\2\1/;//D;s/.//' | sed -e 's/ //g'

Neither is perfect. The first one doesn't have the degree symbol and the second one has an extra weird symbol in addition to the degree symbol.

So, if you're nitpicky, you can do what I did, and made two new geektool entries, one for the C (echo "C"), and one for the degree symbol (actually an "o" made smaller and placed higher: echo "o")

Anyways, hope that helps. Be interested to see if anyone else has a better solution.
 
Thanks Again

Thanks again for you help zzzzzzzz - i followed you idea and have ended up with this:
 

Attachments

  • 1.jpg
    1.jpg
    106.8 KB · Views: 716
How would you get it to display a current currency exchange rate?

I'd need someone who's experienced with sed to come up with the script, but you can get the results to use from this link:

http://www.google.com/finance/converter?a=1&from=USD&to=EUR

Substitute the currency codes you want to go to and from and the value (a=1 is the denomination to compare), and get sed to strip the extraneous data from the page, and you should be good to go. What I have so far (not working, shows nothing, so help would be great):

curl http://www.google.com/finance/converter?a=1&from=USD&to=EUR | sed -n '<span class=bld>' | sed -e 's/"%nbsp;"/ /' | sed -e 's/"<span class=bld>"//' | sed 's/"</span>"//

I based that on the weather scripts, but I probably messed up the syntax in the sed command.

jW
 
I'd need someone who's experienced with sed to come up with the script, but you can get the results to use from this link:

http://www.google.com/finance/converter?a=1&from=USD&to=EUR

Substitute the currency codes you want to go to and from and the value (a=1 is the denomination to compare), and get sed to strip the extraneous data from the page, and you should be good to go. What I have so far (not working, shows nothing, so help would be great):

curl http://www.google.com/finance/converter?a=1&from=USD&to=EUR | sed -n '<span class=bld>' | sed -e 's/"%nbsp;"/ /' | sed -e 's/"<span class=bld>"//' | sed 's/"</span>"//

I based that on the weather scripts, but I probably messed up the syntax in the sed command.

jW

why not use delimiters in applescript and set x=info you want and then return x
and then in geektool use script and osascript...?
 
why not use delimiters in applescript and set x=info you want and then return x
and then in geektool use script and osascript...?

Because I have no idea how to do that. :p;) I'm not experienced with that. If anyone wants to complete the script in any way they feel is appropriate, please post it back here for anyone who is able to use it.

jW
 
I repeatedly have tried this

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

and I don't get anything

my console reads back

Code:
59.0?F Tardis:~ pete$

when I run it manually
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.