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 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

That's odd, as I just tried your code on my system and it worked fine:
GT-1.jpg
 
even running lynx -h does not give any output

Code:
/opt/local/var/macports/sources/rsync.macports.org/release/ports/www/lynx -h

Its as if Geek tool just wont run lynx on my machine as if its a choice


So I got pissed and figured it out in CURL thank god my school runs its own weather system

Code:
curl -s http://www.coastal.edu/about/weather.html | awk '/<h2 align="center">/ ' | textutil -convert txt -stdin -stdout -format html| \
 iconv -f utf-8 -t ucs-2-internal
 
cpu temps?

hi all,
i'm just getting started with geektool, and love it! I like having my main desktop (on my external monitor) clear, and I rarely use my MBP's screen-space (save for the odd photoshop palette or something), so this is a perfect use for it. I've currently got the standard system stats (top, uptime, total ram, total cpu, etc.), my ical events & tasks for the next few days (thanks to 'icalbuddy'), and the currently playing itunes track (haven't been able to get artwork functioning, sadly). I hadn't thought before to try to make the stuff i've got running look good, but i've got to say you all have inspired me - i'll be combing through my font-book post-haste!

One thing i'd love to be able to have up in big bold numbers are the internal temperatures of my cpus, gpus, etc., but I haven't been able to find a command/script that could do this, and have no unix savvy myself. Currently i've got it displayed in my menu bar, courtesy of istat menus, but that doesn't do me much good when i'm sitting back in the lazy boy watching a movie or playing a game in fullscreen (on the external monitor). My MBP has some serious overheating issues (currently 74 degrees C, with the fans running at 6000rpm & a big fan sitting right behind it on high!!!), so this would be really helpful for me! Anyone know how I could do this, or where I could find the command (i tried googling... it brought me here!)?
cheers, and keep up the great work!
dave
 
There is a way. you have to apply certain limits to the top application but you can get a few of the features you just mentioned
 
That's quite a wallpaper. ;)

wow mate that is impressive. any chance of PM'ing me your code and fonts used for the time?? thats soooo good.

I'll post a link to a screenshot and all the scripts/fonts i used later today as for some strange reason Geektool replaced all the scripts i had running with "date +%B" after a reboot.

Has this happened to anyone else? Or is this just my **** luck continuing on Friday the 13th?
 
Fixed Weather Conditions and Forecasts

i spent hours trying to get a working weather conditions script to work for geektool. here's my script: (you need lynx to get it to work, if you dont know what it is, dont worry about it youll never use it, just install it)

Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=YOURZIPCODE|awk '/Cond|Temp|Humid|Wind|Max|Min|Norm|Rec|Fore/'

in geektool go to new shell, paste that in there, and replace YOURZIPCODE with, well, your zip code. then copy http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=YOURZIPCODE into your web browser, replacing YOURZIPCODE with your zip code. you should have a fairly simple-looking page with weather info on it. you may have noticed in the script a whole bunch of words separated by lines. these are our parameters. scroll through the list of current weather things in your web browser, making note of the entries you want to be displayed on your desktop. i have current conditions (Cond), current temperature (Temp), humidity (Humid), wind speeds (Wind), yesterdays maximum and minimum temperatures (Max, and Min, respectively), normal highs and lows for today (Norm), record highs and lows for today (Rec), and todays forecast (Fore). you can change these to be whatever you want (given that they are available on the web page) it may take some experimenting to get everything you want to work right, just try different names, like if Temperature doesnt work, try Temp, or something like that. just make sure you separate each param with a | and make sure you begin and end your param series with /'

happy geeking :apple: :D
 
hey guys - here's my latest. getting a little info overload here, but i've leaner 'groups' that i switch to when i'm, say, not interested in the financials. if anyone wants those codes, by the way:

GOLD futures:
curl http://www.barchart.com/ | grep 'Gold' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -1 | sed 's/Gold/GOLD /g' | sed 's/+/ +/g' | sed 's/-/ -/g'

OIL futures:
curl http://www.barchart.com/ | grep 'Oil' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -1 | sed 's/Crude Oil/OIL /g' | sed 's/-/ -/g'

S&P:
curl http://www.google.ca/finance?q=INDEXSP:.INX | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/S\&P 500 /g'

DOW:
curl http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -3 | sed '$!N;s/\n/ /'| sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/DOW /g'

NASDAQ:
curl http://www.google.ca/finance?q=INDEXNASDAQ:.IXIC | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/NASDAQ /g'

Market chart:
http://www.google.com/finance/chart?cht=c&q=INDEXDJX:.DJI,INDEXSP:.INX,INDEXNASDAQ:.IXIC

It also wouldn't be too hard to get one's whole portfolio embedded, but i'm kinda hiding from mine right now.
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    953.8 KB · Views: 742
  • financials.jpg
    financials.jpg
    126.8 KB · Views: 216
hey guys - here's my latest. getting a little info overload here, but i've leaner 'groups' that i switch to when i'm, say, not interested in the financials. if anyone wants those codes, by the way:

GOLD futures:
curl http://www.barchart.com/ | grep 'Gold' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -1 | sed 's/Gold/GOLD /g' | sed 's/+/ +/g' | sed 's/-/ -/g'

OIL futures:
curl http://www.barchart.com/ | grep 'Oil' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -1 | sed 's/Crude Oil/OIL /g' | sed 's/-/ -/g'

S&P:
curl http://www.google.ca/finance?q=INDEXSP:.INX | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/S\&P 500 /g'

DOW:
curl http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -3 | sed '$!N;s/\n/ /'| sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/DOW /g'

NASDAQ:
curl http://www.google.ca/finance?q=INDEXNASDAQ:.IXIC | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/NASDAQ /g'

Market chart:
http://www.google.com/finance/chart?cht=c&q=INDEXDJX:.DJI,INDEXSP:.INX,INDEXNASDAQ:.IXIC

It also wouldn't be too hard to get one's whole portfolio embedded, but i'm kinda hiding from mine right now.
Nice! Cheers mate!
 
hey guys - here's my latest. getting a little info overload here, but i've leaner 'groups' that i switch to when i'm, say, not interested in the financials. if anyone wants those codes, by the way:

GOLD futures:
curl http://www.barchart.com/ | grep 'Gold' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -1 | sed 's/Gold/GOLD /g' | sed 's/+/ +/g' | sed 's/-/ -/g'

OIL futures:
curl http://www.barchart.com/ | grep 'Oil' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -1 | sed 's/Crude Oil/OIL /g' | sed 's/-/ -/g'

S&P:
curl http://www.google.ca/finance?q=INDEXSP:.INX | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/S\&P 500 /g'

DOW:
curl http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -3 | sed '$!N;s/\n/ /'| sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/DOW /g'

NASDAQ:
curl http://www.google.ca/finance?q=INDEXNASDAQ:.IXIC | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed '$!N;s/\n/ /' | sed '$!N;s/\n/ /' | sed 's/^/NASDAQ /g'

Market chart:
http://www.google.com/finance/chart?cht=c&q=INDEXDJX:.DJI,INDEXSP:.INX,INDEXNASDAQ:.IXIC

It also wouldn't be too hard to get one's whole portfolio embedded, but i'm kinda hiding from mine right now.

Thanks for that, now I don't have to keep a tab open for the stock market during the day.
 
Does anyone have the link to the script (Lifehacker one is dead) for the Skype Contacts with Geektool?

Thx

Also

Hey yall. If anyone wants all the scripts in one location I tried to gather them all here.
Here is my desktop http://img.skitch.com/20090306-kdwbnttja6s95rtdq4wt7m2htm.jpg

I've seen the RSS feed one before AND one that used a news.sh script, neither of which display rss feeds like MSNBC or even the MacRumors one. Does anyone else know a way to display these in Geektool?

EDIT: Here's Mine
Using Date/Weather/ (gathered from various sources, same as ones posted here)
iTunes "Now Playing" script
iTunes Lyrics script
HD Sizes etc

Geektool.png
 
Here are my GeekTool scripts, just set up. Unfortunately the calendar I had to do manually for now, which means I'll have to update it each month (the current date is being highlighted automatically, but I'll have to swap out the monthly calendar because the cal command doesn't let me do a single line calendar).

jW

since i am not as good as most of the users in this thread. how exactly did you do a single line month 'script'.
or could you at least make a short step by step guide of how you stylized your calendar, pls?

edit:
btw, for reference i am talking about post #102. its so pretty :)
 
I don't understand why the weather temperature and conditions will one minute work absolutely perfectly, and then the next minute all this other text randomly shows up and make everything look awful. It's the EXACT same code I had in earlier. It's SO FRUSTRATING.
 
I don't understand why the weather temperature and conditions will one minute work absolutely perfectly, and then the next minute all this other text randomly shows up and make everything look awful. It's the EXACT same code I had in earlier. It's SO FRUSTRATING.

I believe it is an issue with the feed, not the script, and it should self correct

Woof, Woof - Dawg
pawprint.gif
 
Does anyone have link to download lynx that's not Apple's site. I've been looking all over this evening and every place I've found the file (that's supposed to be 3 mb, it downloads with no file size...0kb and the file isn't good.

The only two places I seem to be able to find to download from are Apple and the lynx site. All files are empty.

Finally got it to download. Nevermind my post...oops!
 
I've seen the RSS feed one before AND one that used a news.sh script, neither of which display rss feeds like MSNBC or even the MacRumors one. Does anyone else know a way to display these in Geektool?

hey kkat,

it's pretty easy to learn how to use curl to fetch the .xml page, and then just figure out the code to scrape out the bits you want.

so, for macrumors, you could do something like this to just get titles:

curl https://www.macrumors.com/macrumors.xml | grep 'title' | sed '1!G;h;$!d' | sed -e 's/<title>//g' | sed -e 's/<\/title>//g' | sed -e 's/"/"/g'

or if you want a little more:

curl https://www.macrumors.com/macrumors.xml | sed -e '/title/b' -e '/description/{n;p;}' -e d | sed -e 's/"/"/g' | sed -e 's/<br \/>//g' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'

msnbc looks a tad trickier to parse, but i found this guide really helpful if you want to take a crack at it:
http://sed.sourceforge.net/sed1line.txt

it opens up a ton of websites, so i've been finding my main limitation one of imagination. just kinda running out of ideas for stuff i want on my desktop.

anyways, hope that helps.

say, you got a link for your background?
 
haha damn, you guys get all creative. I just use geektool to paste plain text on my desktop to remind me of things I need to do!:p
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.