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

When I try this curl outputs some transfer data. Any thoughts:

11:04 AM ~ => curl http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/price-panel style/,/ Close/p' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'| sed '/^$/d' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | head -1 | sed 's/^/DOW: /g'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 53098 0 53098 0 0 184k 0 --:--:-- --:--:-- --:--:-- 216k
DOW: 10,861.09 +89.61 (0.83%)

It's because you don't have the silent tag added to the curl command.

Here is the new command for you:
Code:
curl --silent http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/price-panel style/,/ Close/p' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'| sed '/^$/d' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | head -1 | sed 's/^/DOW: /g'

If you wanted something more powerful, you could try my Stock Ticker Python script: http://code.google.com/p/xtacocorex-geektool-scripts/wiki/StockTickerHowTo
 
Tasks

So I have a few questions about Tasks. On the right side I would like this to stay the same. When I start putting priority on items it changes the order. Is there some way to stop this from happening. The column in the middle is where I want the priority items to be organized by HIGH, MED, and LOW. I've been scanning over this site for days now. I didn't want to have another post that wasn't needed. help would be greatly appreciated.
 

Attachments

  • Untitled.png
    Untitled.png
    844.5 KB · Views: 469
Do get it to work: 5-day weather forecast

hey,
i tried some hours to get the python script for the 5-days weather forecast to work.
but no result... :( I think the problem is to find my correct location ?! When i try to use the option "-w" for the direct URL the script don´t work???

What i would like to get is something like this forecast: e.g.
http://de.wetter.yahoo.com/deutschland/niedersachsen/hannover-657169/

Can some one send me a script for grabbing these information??? :rolleyes:
 
help?

Does anybody know how to do this? I'm trying to get the CPU meter thingy on the bottom right hand of the picture onto my desktop. The person who put that picture up originally did it with rainmeter and I think the image there correlates to the amount of actual usage (or something like that) with the cpu. Is there a way to get that script to work with geektool? I downloaded the package and it has 3 .png's and then a .ini file. Is there any way to compile it to make it work on a mac? I really like that image and functionality, plus I would like it because I'm trying to come up with a new geektool background.

http://flic.kr/p/asmKjq

Code:
[url=http://www.flickr.com/photos/52847067@N08/6205487768/][img]http://farm7.static.flickr.com/6163/6205487768_a8e1f9a339.jpg[/img][/url]
[url=http://www.flickr.com/photos/52847067@N08/6205487768/]screenshot[/url] by [url=http://www.flickr.com/people/52847067@N08/]christophina[/url], on Flickr[/COD
 
hey,
i tried some hours to get the python script for the 5-days weather forecast to work.
but no result... :( I think the problem is to find my correct location ?! When i try to use the option "-w" for the direct URL the script don´t work???

What i would like to get is something like this forecast: e.g.
http://de.wetter.yahoo.com/deutschland/niedersachsen/hannover-657169/

Can some one send me a script for grabbing these information??? :rolleyes:

I know there is currently an issue with my script displaying data when the web page displays Celsius temperatures. I think the IP grabbing stuff is working, if you open up terminal.app and type the following code, it should display the woeid for your current location.
Code:
cat ~/.zip_woeid_map.txt

The underlying HTML is also a little different than it is for the United States, that's the main issue. I don't remember if I put a caveat on the script post in this thread saying that it might not work for people outside of the USA.

If you run the following in geektool, you'll get output to display:
Code:
python fivedayforecastv3.py -w http://weather.yahoo.com/germany/lower-saxony/hanover-657169/ -d
You will have to deal with the output in English.
 
quote scrpit problem!

Hi everybody!

i have a problem with my script for italian quote of the day...

This is the script (a simple feedrss reader!)

URL="aforismi.meglio.it/feed-afo-del-giorno.xml"
start="1"
end="11"
curl --silent "$URL" |
sed -e :a -e '$!N;s/\n//;ta' |
sed -e 's/<aforisma>/\
<aforisma>/g' |
sed -e 's/<\/aforisma>/<\/aforisma>\
/g' |
grep -E '(aforisma>)' |
sed -n "$start,$"'p' |
sed -e 's/<aforisma>//' |
sed -e 's/<\/aforisma>//' |
sed -e 's/<!\[CDATA\[//g' |
sed -e 's/\]\]>//g' |
sed -e 's/</</g' |
sed -e 's/>/>/g' |
sed -e 's/<[^>]*>//g' |
head -$end |
sed H |
fmt
curl --silent "$URL" |
sed -e :a -e '$!N;s/\n//;ta' |
sed -e 's/<author>/\
<author>/g' |
sed -e 's/<\/author>/<\/author>\
/g' |
grep -E '(author>)' |
sed -n "$start,$"'p' |
sed -e 's/<author>/ /' |
sed -e 's/<\/author>//' |
sed -e 's/<!\[CDATA\[//g' |
sed -e 's/\]\]>//g' |
sed -e 's/</</g' |
sed -e 's/>/>/g' |
sed -e 's/<[^>]*>//g' |
cut -c 1-$maxLength |
head -$end |
sed G |
fmt

and this is the problem: some letters or signs as è or é i cannot see them... and they are substited by other (for example α#232)
with every font i try!!

i post you an example...


schermata20111009a14381.png




the problem in in the right side of the screen ... the quote is "nessuno α#232; infelice se non per colpa sua...."

this happens also for other fonts letter with any kind of font i use!!!!!!!

how can i do?!?!?!

thank you!
 
I have a relatively simple request for you geektoolers, I've had to reinstall mine and I've lost everything ):

I just need a quick script for displaying what day of the month it is with the appropriate suffix. For example I've found plenty would show "11" for today, for example, but can't find one which would read "11th". Any help on this front would be greatly appreciated!
 
This should do it.
Code:
date +%d | sed -E 's/([^1]1)$/\1st/'| sed -E 's/([^1]2)$/\1nd/' |sed  -E 's/([^1]3)$/\1rd/' | sed -E 's/([0-9])$/\1th/'
Thanks to whoever I got it from on this forum thread.:)
 
This should do it.
Code:
date +%d | sed -E 's/([^1]1)$/\1st/'| sed -E 's/([^1]2)$/\1nd/' |sed  -E 's/([^1]3)$/\1rd/' | sed -E 's/([0-9])$/\1th/'
Thanks to whoever I got it from on this forum thread.:)

Thankyou very much [=

May as well post my setup (minus the new script, can't be bothered with uploading a new pic XD)
ScreenShot2011-10-11at212536.png
 
Last edited by a moderator:
How can i show the accented character? (i'm an italian user but i know that the problem is similar for french and german people)!
Often i see &@242 at the place of ò!!
 
can someone please give me script for vertical calendar? just calendar name and numbers with some separators, thanks!
 
Please someone can help me?!

I have this code for rss reader

Code:
#!/usr/bin/ruby

require 'rss'

rss = RSS::Parser.parse 'http://feeds.feedburner.com/Pensieriparole-FrasiDelGiorno'
 
print rss.items[0].description.sub[COLOR="Red"](/<.*/n,'')[/COLOR].strip, "\n"


I would like to read also the author of the quote.

How i should change the red part of the code?!?!

Thank you guys!!!
 
I have this code for rss reader

I would like to read also the author of the quote.

How i should change the red part of the code?!?!

This should work...
Code:
#!/usr/bin/ruby

require 'rss'

rss = RSS::Parser.parse 'http://feeds.feedburner.com/Pensieriparole-FrasiDelGiorno'

print rss.items[0].description.sub(/<br><i>*/n,' ').sub(/<.*/n,'').strip, "\n"

Though I'm not real sure how great this parser will be for that site you want. That site seems to use a lot of HTML inside the quotes (especially with quotes on multiple lines), which this parser doesn't get rid of, so the line breaks and whatnot will show up in the geektool output I'm assuming. I'd try to edit it more but I've not really used ruby much.
 
This should work...
Code:
#!/usr/bin/ruby

require 'rss'

rss = RSS::Parser.parse 'http://feeds.feedburner.com/Pensieriparole-FrasiDelGiorno'

print rss.items[0].description.sub(/<br><i>*/n,' ').sub(/<.*/n,'').strip, "\n"

Though I'm not real sure how great this parser will be for that site you want. That site seems to use a lot of HTML inside the quotes (especially with quotes on multiple lines), which this parser doesn't get rid of, so the line breaks and whatnot will show up in the geektool output I'm assuming. I'd try to edit it more but I've not really used ruby much.

Thank you so much! everything works!!!
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.