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.

creator2456

macrumors 68000
Jul 10, 2007
1,649
2
Chicago
Don't know if you want it to be a geektool replacement or if it doesn't matter, but I personally think the yahoo widget looks 100x better then anything you can do with geektool. Heres the link if your interested http://widgets.yahoo.com/widgets/widescapeweather

Just installed it to see if I could get it looking good with my current setup and decided against it. Not saying it doesn't look nice or have a good feture set, just doesn't fit in currently.

I did however find something odd when I installed the YahooWidget Engine. It COMPLETELY REPLACED my iSerial Reader app. Not that I use it much, just very very very odd to see.

I don't think I'll be using Yahoo Widgets again due to this.
 

Tweak3D

macrumors regular
Jul 17, 2007
181
0
so I checked all of my commands manually and for some reason terminal is displaying everything in english, this is why I am getting all of my output in english. How can I change the language displayed by terminal?
 

Tweak3D

macrumors regular
Jul 17, 2007
181
0
I also have a question regarding the use of foreign characters. I am trying to use a script to pull an RSS feed from a german website but it seems to not be displaying or bringing over the umlauts. Here is the script im using.

Code:
#!/bin/sh

URL="www.spiegel.de/schlagzeilen/eilmeldungen/index.rss"

if [ $# -eq 1 ] ; then
  headarg=$(( $1 * 2 ))
else
  headarg="-8"
fi

curl --silent "$URL" | grep -E '(title>|description>)' | \
  sed -n '4,$p' | \
  sed -e 's/<title>//' -e 's/<\/title>//' -e 's/<description>/   /' \
      -e 's/<\/description>//' | \
  sed -e 's/<!\[CDATA\[//g' |            
  sed -e 's/\]\]>//g' |         
  sed -e 's/<[^>]*>//g' |      
  head $headarg | sed G | fmt

Any help would be greatly appreciated.
 

tooz

macrumors 6502
Jul 21, 2009
311
0
ok, I need some help.

my script keeps coming up with this "Â" before the "º" sign. (prefer this weatherzone script because it's more accurate for my area). anyway, I have worked out that its the º sign in the last characters of the script
Code:
curl -s --connect-timeout 30 "http://webservice.weatherzone.com.au/rss/wx.php?u=13145&lt=aploc&lc=3435&obs=1&fc=1&warn=1" | grep "Temperature" | sed -e 's,.*/b> \(.*\)&.*,Now: \1 °C,'

you can see the problem in the attached picture.
I know it's not the font, as I've tried others.

can anyone help?
(SL if it matters)
 

Attachments

  • Screen shot 2009-11-29 at 8.32.28 PM.png
    Screen shot 2009-11-29 at 8.32.28 PM.png
    29.9 KB · Views: 3,210

creator2456

macrumors 68000
Jul 10, 2007
1,649
2
Chicago
ok, I need some help.

my script keeps coming up with this "Â" before the "º" sign. (prefer this weatherzone script because it's more accurate for my area). anyway, I have worked out that its the º sign in the last characters of the script
Code:
curl -s --connect-timeout 30 "http://webservice.weatherzone.com.au/rss/wx.php?u=13145&lt=aploc&lc=3435&obs=1&fc=1&warn=1" | grep "Temperature" | sed -e 's,.*/b> \(.*\)&.*,Now: \1 °C,'

you can see the problem in the attached picture.
I know it's not the font, as I've tried others.

can anyone help?
(SL if it matters)

Change the Output Encoding to UTF8.
 

vrede

macrumors newbie
Nov 29, 2009
1
0
I have no idea (really) what I'm doing, but I somehow managed to pull together this script (based on others in this thread, mostly) to get the latest quote of the day from an RSS feed I had in Google Reader. If anyone can make it better, please do so - for example, I can't figure out how to remove the blank lines at the top of each section when it's returned...

Code:
#!/bin/sh

url="http://feeds.feedburner.com/quotationspage/qotd"


if [ $# -eq 1 ] ; then
  headarg=$(( $1 * 2 ))  # $(( )) specifies that you're using an equation
else
  headarg="-8"  # default is four headlines 
fi

curl --silent "$url" | grep -E '(<description>)' | \
	sed '/^$/d' |\
	sed -n '2,$p' |\
	sed -e 's/<description>//' \
 	    -e 's/[^][^]*logo<\/description>//' \
            -e 's/<a href=[^][^]*description>//' |\
	head $headarg | fmt -w 115

curl --silent "$url" | grep -E '(title>|<description)' | \
	sed -n '4,$p' |\
	sed -e 's/<title>/-/' \
            -e 's/<description[^][^]*description>//' \
	    -e 's/<\/title>//' |\
 	head $headarg | fmt

Hey,
I'm sort of new to this so I'm in need of help. Could somebody be so patient to update the quote of the day-script? The quoted above almost works but sadly only almost
 

Attachments

  • Bildschirmfoto 2009-11-29 um 11.33.42.png
    Bildschirmfoto 2009-11-29 um 11.33.42.png
    122.8 KB · Views: 162

tooz

macrumors 6502
Jul 21, 2009
311
0
I think the setting is only in 3.0 RC5.

To anyone, is there a reason to use 2.1.2 over 3.0 RC5?

I went for the 2.1.2 because my internet's capped to 64 kbps and it was a smaller download.

I'll upgrade to 3.0 once my internet goes back up to 1.5Mbps and I get my 12GB back (geez I hate Australia and it's broadband)

but thanks for your help, I really appreciate it:)
 

steezy1337

macrumors 6502
Dec 29, 2008
338
0
Carlisle, UK
i'm having problems finding a script to just display my CPU usage without showing what processes are actually running. i tried using the script below in the geektool command window but it says it won't work, any ideas why?

uptime| awk '{print "UPTIME: " $3 " " $4 " " $5 " "}'; tp[-|1| awk'/PhysMem/{print "RAM : " $8 " "}'

also the scripts i've found to display ram & cpu usage never seem to work for me, does anyone have a working one i could use?
 

coops

macrumors regular
Sep 10, 2009
240
45
Well, I prefer to keep my desktop pretty clean and dark... and don't really 'use' it much.. but couldn't resist the Geek - added date and time to my desktop - font is Gill Sans.

Fun tool - took some rummaging and trial and error to find out how to use it.. and some time to line those geeklets up nicely so it'll be ok when the 'January' and etc with lower descenders (? is that the correct font stylee term? ) come round....

ScreenshotGeekTool_30nov.jpg
 

Attachments

  • Screen shot GeekTool_30nov.jpg
    Screen shot GeekTool_30nov.jpg
    64.9 KB · Views: 116

Chartreux

macrumors newbie
Nov 23, 2009
14
0
Quotes of the day

Hey,
I'm sort of new to this so I'm in need of help. Could somebody be so patient to update the quote of the day-script? The quoted above almost works but sadly only almost

Maybe this helps:
Code:
#!/usr/bin/ruby

require 'rss'

rss = RSS::Parser.parse 'http://feeds.feedburner.com/quotationspage/qotd'

puts rss.channel.title,""

rss.items.each do |item|
  puts "#{item.description.sub(/<.*/m,'').strip} - #{item.title}"
end

Output:
Code:
Quotes of the Day

"Fallacies do not cease to be fallacies because they become fashions." - G. K. Chesterton
"The only sure thing about luck is that it will change." - Bret Harte
"Life is a long lesson in humility." - James M. Barrie
"The case has, in some respects, been not entirely devoid of interest." - Sir Arthur Conan Doyle
"The lion and the calf shall lie down together but the calf won't get much sleep." - Woody Allen
"A hotel isn't like a home, but it's better than being a house guest." - William Feather
"The world is full of willing people, some willing to work, the rest willing to let them." - Robert Frost
"Misery no longer loves company. Nowadays it insists on it." - Russell Baker
"It is only the great men who are truly obscene. If they had not dared to be obscene, they could never have dared to be great." - Havelock Ellis
"College isn't the place to go for ideas." - Helen Keller
"A celebrity is a person who works hard all his life to become well known, then wears dark glasses to avoid being recognized." - Fred Allen
"I have a rock garden. Last week three of them died." - Richard Diran
 

i person

macrumors newbie
Jun 21, 2009
29
0
UK
Was just wondering if anyone else was having issues with next month's calendar.
Mine shows this month but not next month. :eek:
I'm new to geektool and don't have a clue how to sort this so any help would be great.

Also i'd like to thank everyone who has posted code up on this thread, it's helped me to get a unique desktop. :)
 

Seshan

macrumors newbie
Apr 21, 2009
13
0
Where did you get that dock? I had it too and I delete it by accident. A friend of mines forward it to me and now i cant find it. BTW put a "T" In the it makes ur pic smaller. ex. [img];)[/QUOTE]

I got the dock from leoparddocks.com and the indicators I found on deviant art.
 

jatlas

macrumors newbie
Dec 1, 2009
5
0
I was using the script posted a few pages back to 'highlight' the current date on a calendar. As it rolled over into December the script stopped working. Am I alone in this or is anyone else having the same problem?

Formerly working code:
Code:
cal | perl -wne 'BEGIN{chomp($d = `date "+%e"`)} if (/^ *\d/) {s/\b$d\b/"#" x length($d)/e; s/\d/ /g; s/#+/$d/g; print}'
 

Chartreux

macrumors newbie
Nov 23, 2009
14
0
I was using the script posted a few pages back to 'highlight' the current date on a calendar. As it rolled over into December the script stopped working. Am I alone in this or is anyone else having the same problem?

Formerly working code:
Code:
cal | perl -wne 'BEGIN{chomp($d = `date "+%e"`)} if (/^ *\d/) {s/\b$d\b/"#" x length($d)/e; s/\d/ /g; s/#+/$d/g; print}'

Well, the problem is that `date +%e` returns " 2", not "2" (note the leading space).
The substitute command "s/\b$d\b/" searches for $d surrounded by \b (word boundaries), meaning a-z, a digit or an underscore. Not a space!
But $d contains a space, so it does not match...
So: you need a date format without the leading space, but unfortunately such a format does not exist (%d prints the day with a leading zero if necessary).
Another solution is to strip the leading space from $d with a sed:
Code:
cal | perl -wne 'BEGIN{chomp($d = `date "+%e" [B]| sed "s/^ //"[/B]`)} if (/^ *\d/) {s/\b$d\b/"#" x length($d)/e; s/\d/ /g; s/#+/$d/g; print}'
 

jatlas

macrumors newbie
Dec 1, 2009
5
0
Another solution is to strip the leading space from $d with a sed:
Code:
cal | perl -wne 'BEGIN{chomp($d = `date "+%e" [B]| sed "s/^ //"[/B]`)} if (/^ *\d/) {s/\b$d\b/"#" x length($d)/e; s/\d/ /g; s/#+/$d/g; print}'

Haha WAY over my head but the coding works perfectly. Thank you :)


On a similar note, has anyone figured out how to display the next month calendar correctly? All of the codes that have been posted put up January 2009 when I try them..
 

jhncbrwn

macrumors newbie
Feb 17, 2009
1
0
How to show a random line from a text file

Could somebody please help me with a script that shows a random line from a text file.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.