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.
Few scripts

Long back I posted (somewhere in a forum) a collection of shell commands which might be helpful (this was working well with Geektool 2, but some of them doesn't work with Geektool 3). The following are included in the link

Time, Weather, Calendar, CPU Usage, RAM hogger, Disk space, Network connections, Apple Mail unread count, iTunes, RSS, Miscellaneous, Sources, My current scripts

http://www.alice-dsl.net/ctamilselvi/GeekTool.html
 
I tried your --netherlands/north-holland/haarlem-729636-- on my system and, at first, it did not work. So, I fully exited geektools and restarted it.

I created the Image using the file location file://localhost/var/tmp/weather_test.png

I then created the shell using curl --silent "http://weather.yahoo.com/netherlands/north-holland/haarlem-729636" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /var/tmp/weather_test.png\

Doing it this time the image shows up. So - you might want to try that (quitting and restarting). Good luck!

Still not working *arghh*

but thanks for helping

maybe it is necessary to download geektool nr 3 ?
 
Long back I posted (somewhere in a forum) a collection of shell commands which might be helpful (this was working well with Geektool 2, but some of them doesn't work with Geektool 3). The following are included in the link

Time, Weather, Calendar, CPU Usage, RAM hogger, Disk space, Network connections, Apple Mail unread count, iTunes, RSS, Miscellaneous, Sources, My current scripts

http://www.alice-dsl.net/ctamilselvi/GeekTool.html

It did the trick with your weather script!

But do you also have a script for temperature and current weather seperated ?? instead of both in one script?

cheers
 
The picture is showing but the shell does not..

I put this in a shell:

curl --silent "http://weather.yahoo.com/netherlands/north-holland/haarlem-729636" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\

What do you mean the shell is not?
This shell script does not print/output anything. It only retrieves the image that you're using in the second (image) script!

ps: if you don't use this script your picture will never update
 
US Weather

Houston: TZ=US/Central date +"Houston: %I:%M %p %D"

here's a script for a world clock which i got here. i couldn't get the script to work using the setup as depicted on the webpage link, but after switching to gmt format it seems to work just fine.

(i added in the "-" bit which you can remove or replace with another character.)

TZ=Alaska/GMT9 date +"Anchorage: %I:%M %p - %D"
TZ=NewYork/GMT5 date +"New York: %I:%M %p - %D"
TZ=England/GMT date +"London: %I:%M %p - %D"
TZ=Australia/GMT-10 date +"Sydney: %I:%M %p - %D"


(this is a VERY cool thread! :D)
 
What do you mean the shell is not?
This shell script does not print/output anything. It only retrieves the image that you're using in the second (image) script!

ps: if you don't use this script your picture will never update

Oke !

Than it works, srry for that but I ment the current weather conditions were showing up with this script ( my bad )

thanks for help
 
Long back I posted (somewhere in a forum) a collection of shell commands which might be helpful (this was working well with Geektool 2, but some of them doesn't work with Geektool 3). The following are included in the link

Time, Weather, Calendar, CPU Usage, RAM hogger, Disk space, Network connections, Apple Mail unread count, iTunes, RSS, Miscellaneous, Sources, My current scripts

http://www.alice-dsl.net/ctamilselvi/GeekTool.html

Hey, I saw your screenshot, and I was wondering how did you do the "pause sign" next to your calendar...?
 
I'm having some trouble getting weather and conditions on GeekTool 3.0RC5. I tried everything. Could someone help me get weather and conditions? I have Lynx installed already. Thanks.
 
Hi all,

Does anyone know if it would be possible to monitor Transmission or even uTorrent traffic with a shell script? Thanks!
 
GeekTool Noob with

just to reiterate what poppero is trying to say, make 3 shell scripts

1st
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=YOURZIP&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>//'

2nd
Code:
curl --silent "http://weather.yahoo.com/forecast/YOURCITYCODE.html" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png

3rd
Code:
file:///tmp/weather.png

for the first put your zipcode where it says "YOURZIP"

for the second replace your city code, as it appears on weather.yahoo.com, where it says "YOURCITYCODE" should start US.........

for the third just leave it alone and it should work

I have tried these scripts with no luck for number 2 and for the weather image. The first script works. When I go to weather.yahoo.com for my city I get the following page: weather.yahoo.com/united-states/california/sun-city-12796537/ This is for Sun City, California zip code 92585.

I am not sure what I need to do to get this to work. My understanding is that for the 3rd script it is an image, not a shell. I am using GeekTool 3.

Anybody have any suggestions?

Thanks
EDIT: I was able to get it to work. I will try and post my desktop.
 
First GeekTool Desktop

Me and my daughter came up with this desktop :D :apple:
 

Attachments

  • Screen shot 2009-11-18 at 10.01.14 PM.jpg
    Screen shot 2009-11-18 at 10.01.14 PM.jpg
    1,022.8 KB · Views: 424
Hi,

Can someone tell me how to get the following :

Track ...
Album .....
Artist .....

Shown on the righthand corner of this picture

many thanks,
 

Attachments

  • 3953483766_73b8f5ae20.jpg
    3953483766_73b8f5ae20.jpg
    93.1 KB · Views: 291
XML Weather: How to get it

:apple:Go here::apple:
http://weather.yahoo.com/united-states/

type in your zip code, enter, your weather should appear. IMPORTANT: next to (The Weather Channel Logo) it should read your city, if not, click on state (• Weather >United States >Texas
find your city, click you city... now your nearest station like this: Nearest weather station: Houston, United States

When this is right...Right click on the rss logo to the right, copy link location. Hooray xml weather link.
Took me all-day to figure this out so I'm passing it on to other Geektool novices like myself.

curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USTX0617&u=f" | grep -e "Current Conditions" -A 1 | tail -n 1 | sed -e 's/<BR \/>//'
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USTX0617&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1\ L\:\ \2/" | sed "s/\?\(.*\)/\\1/"
 
Here's mine. I wanted it nice and simple.

4122233210_ed7128cb02_b.jpg


This is really useful thread. Thanks for all the help
 
I don't like my CPU usage code that much but it was the only one I could get to work, any help?

I really like this code but when I put this is nothing shows up

top -l 1| awk 'CPU usage {print $8, $9}'
top -l 1| awk 'CPU usage {print $10, $11}'
top -l 1| awk 'CPU usage {print $12, $13}'

Screenshot2009-11-21at115218AM.png
 
I don't like my CPU usage code that much but it was the only one I could get to work, any help?

I really like this code but when I put this is nothing shows up

top -l 1| awk 'CPU usage {print $8, $9}'
top -l 1| awk 'CPU usage {print $10, $11}'
top -l 1| awk 'CPU usage {print $12, $13}'

Try
Code:
top -l 2 | awk '/CPU usage/ && NR > 5 {print "CPU Usage: ", $3, $4, $5, $6, $7, $8}'

I like this:
Code:
top -l 2 | awk '/CPU usage/ && NR > 5 {print "CPU Usage: ", "User = "$3",", "Sys = "$5",", "Idle = "$7}'
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.