Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > How to use/create GeekTool scripts

How to use/create GeekTool scripts
Thread Tools
carterx
Mac Enthusiast
Join Date: Jan 2007
Location: Canada
Status: Offline
Reply With Quote
Mar 23, 2010, 10:38 AM
 
I have been trying to build some scripts and not having much luck. I have gone over these two sites Geektool 3 - GeekTool 3 User Guide - Tynsoe.org Tracking System & GeekTool: Explained for Beginners � ThemeMyMac & I can not seem to find a site that explains how to properly create a geektool script.

I have added script lines to geektool as postings in forums state and they do nothing so looking to get a better understanding on how to use and create scripts.

Thanks !
     
Hal Itosis
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Mar 23, 2010, 11:59 AM
 
One would need to see a specific example of a script that's not working to determine the reason. Worth noting perhaps is that —if the script is too long —it may be better to save it as a shell script (i.e., in an executable file somewhere), and then just paste its path into GeekTool. E.g.,

/full/path/to/your/long/script

Anyway, post something that doesn't work and let's fix it.
You are running version 3.0 RC5 (116) on OSX 10.5.8 or ?
-HI-
     
carterx  (op)
Mac Enthusiast
Join Date: Jan 2007
Location: Canada
Status: Offline
Reply With Quote
Mar 23, 2010, 03:23 PM
 
Well, I was trying to create the weather app from here MacThemes Forum / [Geektool] Yahoo Weather Image + Temp and Conditions but I need to understand how to create scripts for the needed lines of code/commands.

I'm using the quick one line commands that work fine but having issues getting the weather one created.
     
Hal Itosis
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Mar 24, 2010, 07:49 AM
 
Originally Posted by carterx View Post
Well, I was trying to create the weather app from here MacThemes Forum / [Geektool] Yahoo Weather Image + Temp and Conditions but I need to understand how to create scripts for the needed lines of code/commands.

I'm using the quick one line commands that work fine but having issues getting the weather one created.

From what i can see, Yahoo has rearranged their website... so the URL (and/or tags) that the script tries to load and process aren't what they used to be (when the script was originally written in 2008). That makes the 'image' portion of the script fail.

This text part still seems to work...

curl --silent "http://xml.weather.yahoo.com/forecastrss?p=CAXX0301&u=c" |
grep -E '(Current Conditions:|C<BR)' |sed -e 's/Current Conditions://' \
-e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' \
-e 's/<description>//' -e 's/<\/description>//' |tail -n1

Cloudy, 0 C


IOW, this isn't so much a geektool issue or a shell script issue as it's simply a case of an outdated web link (or a redesigned web page). Maybe there are some newer geeklets posted somewhere... or if someone wants to take the time, they could repair the links/tags used to grab the image. Here is the faulty version:

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

[i seem to remember seeing an AppleScript that would grab an animated gif of the latest radar imagery from http://www.weather.com, but i don't recall where that was. i'm not all that familiar with curl, otherwise i'd pop off a quick attempt right now.]
-HI-
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:14 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,