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.

smwatson

macrumors 6502a
Sep 30, 2005
961
6
London, England
Ok so I've got this so far after a night of playing...

134r.png


Need something else though. Can't get the BBC news RSS to display which would be good. Anyone got any ideas?
 

tomge

macrumors member
Dec 13, 2009
53
0
Belgium
Ok so I've got this so far after a night of playing...

134r.png


Need something else though. Can't get the BBC news RSS to display which would be good. Anyone got any ideas?

Maybe I can help,
How do you want the rss to be displayed? (like all at once or only the latest?)
Can you give me the rss - link, i'm lazy =D

greetz
 

smwatson

macrumors 6502a
Sep 30, 2005
961
6
London, England
Maybe I can help,
How do you want the rss to be displayed? (like all at once or only the latest?)
Can you give me the rss - link, i'm lazy =D

greetz


BBC Sport feed://newsrss.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml

and

BBC News
feed://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml

Like the top 4 or 5 stories from each? I tried with Lynx but I'm not sure if I've installed it right.
 

jck1634

macrumors 6502
Mar 16, 2009
309
137
This is a simple script to more accurately show free disk space under the hard drive icon. (Why hasn't Apple fixed the dot-dot-dot issue yet?)

Going from this:

skrmavbild20100517kl163.png


to this:

skrmavbild20100517kl163.png


Using this:

Code:
#!/bin/sh
FREE=$(df -Hl | grep disk | awk '{print $4}' | cut -c -3)
echo "500 GB, $FREE GB ledigt"

The font and its shadow isn't perfect, but it looks okay I think. And of course, this only works if you do not show information about objects on the desktop.

It's not really accurate if you’ve rounded off the size of your hard drive to better fit in. I just changed the grid spacing in finder and it shows perfectly fine

attachment.php
 

smwatson

macrumors 6502a
Sep 30, 2005
961
6
London, England
Decided don't really need RSS feeds, would clog it up a bit.

Got these on rotation at the mo:

1234567g.png

12345i.png

1234g.png

1234677.png


I like it. Minimalist. Now to find some new icons... This is exciting. Woo.
 

skullcandy

macrumors newbie
May 17, 2010
11
0
Decided don't really need RSS feeds, would clog it up a bit.

Got these on rotation at the mo:

1234567g.png

12345i.png

1234g.png

1234677.png


I like it. Minimalist. Now to find some new icons... This is exciting. Woo.

Ooo, I really like your setup. If you don't mind, would you allow me to imitate it?
 

typhoon7

macrumors newbie
Oct 6, 2009
16
0
WI's Lake Superior shoreline
I must be the only one who would find any current weather warnings useful as a GT script. I posted a question months ago, but no one seemed to have any ideas. I'll repost and hope this catches someone's eye. I would just like to be able to see any current weather warnings at a glance, from either the National Weather Service (e.g. Flood Warning) or Wunderground (e.g. Flood Warning) from one zip code.



I've read through this thread the past two months, and am grateful for all the scripts floating around, thanks all!

I was hoping someone could point me in the right direction to find a certain script, or perhaps jot one down. I've looked at some scripts and I have an idea how they work but would never be able to write my own.

I use the script that uses wunderground for the forecast phrase, and the yahoo weather scripts that show current weather conditions and temperature with a weather icon, but I would like to see a script that can highlight current weather watches, warnings, and advisories for a given location (i.e. county or zip code).

As an example, which I'll try attaching as a screenshot, the next few days I'm under a Winter Storm Warning (like a large chunk of the country). Since I like wunderground, I see that this warning is posted above the forecast in red lettering: "Winter Storm Warning in effect from 6 am Thursday to 6 am CST Saturday..."

This is the exact information that would be useful, and hopefully others would benefit too. Is it possible to take whatever watch or warning that shows up in this position and put it into a GT script?

Thanks in advance for any consideration!
 

Attachments

  • winter storm warning.png
    winter storm warning.png
    210.4 KB · Views: 148

tomge

macrumors member
Dec 13, 2009
53
0
Belgium
Thanks again! Is there any way of displaying what's playing on itunes via geektool, or do I have to download bowtie.

BTW, This is how it looks so far, any suggestions?
image-35A5_4BF2DF4B.jpg

yes there is ;-)
copy and past in a shell geeklet
Code:
echo '
tell application "Finder"
	
	if not (exists process "iTunes") then
		return "iTunes is sleeping"
	else if exists process "iTunes" then
		
		tell application "iTunes"
			try
				return ((name of current track) & return & (artist of current track))
				on error
				return "no song is playing"
			end try
		end tell
	end if
end tell' | osascript
 

smwatson

macrumors 6502a
Sep 30, 2005
961
6
London, England
Thanks again! Is there any way of displaying what's playing on itunes via geektool, or do I have to download bowtie.

BTW, This is how it looks so far, any suggestions?


I like. Think the weather picture is behind the black bar though, right click -> bring to front.

Bowtie is really really great, it sits on the desktop like a geektool thing so it's no fuss.
 

tomge

macrumors member
Dec 13, 2009
53
0
Belgium
I must be the only one who would find any current weather warnings useful as a GT script. I posted a question months ago, but no one seemed to have any ideas. I'll repost and hope this catches someone's eye. I would just like to be able to see any current weather warnings at a glance, from either the National Weather Service (e.g. Flood Warning) or Wunderground (e.g. Flood Warning) from one zip code.



I've read through this thread the past two months, and am grateful for all the scripts floating around, thanks all!

I was hoping someone could point me in the right direction to find a certain script, or perhaps jot one down. I've looked at some scripts and I have an idea how they work but would never be able to write my own.

I use the script that uses wunderground for the forecast phrase, and the yahoo weather scripts that show current weather conditions and temperature with a weather icon, but I would like to see a script that can highlight current weather watches, warnings, and advisories for a given location (i.e. county or zip code).

As an example, which I'll try attaching as a screenshot, the next few days I'm under a Winter Storm Warning (like a large chunk of the country). Since I like wunderground, I see that this warning is posted above the forecast in red lettering: "Winter Storm Warning in effect from 6 am Thursday to 6 am CST Saturday..."

This is the exact information that would be useful, and hopefully others would benefit too. Is it possible to take whatever watch or warning that shows up in this position and put it into a GT script?

Thanks in advance for any consideration!

Hi,
It seems like you are in need of help...

Those warnings, do they need to be displayed by the same script or can it be a different script, in that way you can move around the warnings as you like it? otherwise it will be a newline that sits underneath the current conditions...

Can you give me the URL then I can tell if its going to work or not ;-)

cheers
 

skullcandy

macrumors newbie
May 17, 2010
11
0
yes there is ;-)
copy and past in a shell geeklet
Code:
echo '
tell application "Finder"
	
	if not (exists process "iTunes") then
		return "iTunes is sleeping"
	else if exists process "iTunes" then
		
		tell application "iTunes"
			try
				return ((name of current track) & return & (artist of current track))
				on error
				return "no song is playing"
			end try
		end tell
	end if
end tell' | osascript

Thanks! :D
 

typhoon7

macrumors newbie
Oct 6, 2009
16
0
WI's Lake Superior shoreline
Hi,
It seems like you are in need of help...

Those warnings, do they need to be displayed by the same script or can it be a different script, in that way you can move around the warnings as you like it? otherwise it will be a newline that sits underneath the current conditions...

Can you give me the URL then I can tell if its going to work or not ;-)

cheers

Thanks!

Okay, so I've been searching for a URL that may yield the information needed to parse out what I'm asking for.

If it works, I was looking at the National Weather Services' (NWS) forecast page for an individual point. The only problem in showing an example is, that any watch/warning/advisory that I reference, may be gone in an hour or two.

Either way, this is the URL to pull information from: (NWS link)

At the moment, there is nothing 'interesting' happening in my corner of the world. When there is, bold, underlined, and red text shows up under the header "Detailed 7-day Forecast". I will attach a screenshot of an example where interesting weather is currently happening in Colorado (link).

A clickable map that can be used to zoom into any current severe weather can be found here: (link).

I was originally hoping for a script that would capture these watches/warning/advisory headlines. Just so I that I can glance up and see that oh, I have a Freeze Warning (for example). Using the screenshot as an example, I envision a script to pull:

Severe Thunderstorm Warning
Tornado Watch
Hazardous Weather Outlook

But now that you've asked about multiple scripts, I'm not sure what would work. There are a plethora of potential severe weather headlines that can be used by the NWS, with the possibility of more than one active at any moment in time. If this takes more than one script, then sure, absolutely.

As I think about this, it may be a little confusing to anyone not familiar with the U.S. NWS or how weather watches/warnings/advisories function. If this is too much to handle, I understand, and I'll resign myself to doing without.

I'll take whatever I can get, I have an image in my mind of what I'd like, but I know it's not always possible.
 

Attachments

  • three weather alerts.PNG
    three weather alerts.PNG
    138 KB · Views: 96

ecsong187

macrumors newbie
Jan 23, 2009
16
0
Here is my newest setup.
Still deciding on the fonts, and placement of everything.
Any ideas??
Thanks
Edwin

Picture1-2.png
 

Scrbzzz

macrumors member
Nov 21, 2009
36
0
im still confused, read almost the whole thread and still cant figure it out. i have geektool 3

tell application "Finder"
set dayss to ""
set AppleScript's text item delimiters to "up"
set upt to text item 2 of (do shell script "uptime")

if upt contains "days" then
set AppleScript's text item delimiters to "days"
set dayss to (text item 1 of upt) & "days,"
end if

if upt does not contain "hr" and upt does not contain "mins" then
if dayss ≠ "" then
set AppleScript's text item delimiters to "days,"
set upt to text item 2 of upt
end if
set AppleScript's text item delimiters to ","
set other to text item 1 of upt
set AppleScript's text item delimiters to ":"
set other_hr to dayss & (text item 1 of other) & " hrs, "
set res to other_hr & (text item 2 of other) & " mins"
end if

if upt contains "hr" then
set AppleScript's text item delimiters to "hr"
set res to dayss & (text item 1 of upt) & "hrs"
end if

if upt contains "min" then
set AppleScript's text item delimiters to "min"
set res to dayss & (text item 1 of upt) & "mins"
end if

return res
end tell


when i post that code nothing happens what am i doing wrong?

You dont post that as a code in geektool, you have to save it as a script. Goto Applications/Utilities/Apple Script Editor. Paste the code in there and then save it as a script. Then in geektool tell it to run the script where ever it is saved. IE mine is this
Code:
osascript Users/YOURUSERNAME/bin/Uptime.scpt

bin is just a folder that I have all my geektool scripts in.
 

tomge

macrumors member
Dec 13, 2009
53
0
Belgium
Typhoon,

It worked, now it up to you how you'd like to see it...
Copy, paste and save this code below as an applescript
Enter in a new shellgeeklet > osascript "path/to/your/script.scpt"

Code:
tell application "Finder"
	
	set warn to do shell script "curl \"forecast.weather.gov/MapClick.php?map.x=199&map.y=154&site=pub&zmx=1&zmy=1\""
	
	set AppleScript's text item delimiters to "<span class=\"warn\">"
	set warn to text item 2 of (warn as string)
	set AppleScript's text item delimiters to "</span>"
	set warn to text item 1 of warn
	set AppleScript's text item delimiters to ""
	
	return warn
	
end tell


if you want more stuff from that web then ask and i'll see whats possible.
PS. I allready made an extension for the above script. This one also grabs the written forecast for the next day. if you are interested ....

greetz
 

ecsong187

macrumors newbie
Jan 23, 2009
16
0
My weather images aren't changing from day to day??

I have this entered in one shell:
curl --silent "http://weather.yahoo.com/united-states/washington/lynnwood-12798909//" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\

And the other shell I have:
file:///tmp/weather.png

I have an image showing up, but it doesn't change at all like it should??
Thanks
Edwin
 

typhoon7

macrumors newbie
Oct 6, 2009
16
0
WI's Lake Superior shoreline
Typhoon,

It worked, now it up to you how you'd like to see it...
Copy, paste and save this code below as an applescript
Enter in a new shellgeeklet > osascript "path/to/your/script.scpt"

Code:
tell application "Finder"
	
	set warn to do shell script "curl \"forecast.weather.gov/MapClick.php?map.x=199&map.y=154&site=pub&zmx=1&zmy=1\""
	
	set AppleScript's text item delimiters to "<span class=\"warn\">"
	set warn to text item 2 of (warn as string)
	set AppleScript's text item delimiters to "</span>"
	set warn to text item 1 of warn
	set AppleScript's text item delimiters to ""
	
	return warn
	
end tell


if you want more stuff from that web then ask and i'll see whats possible.
PS. I allready made an extension for the above script. This one also grabs the written forecast for the next day. if you are interested ....

greetz

Tomge, you're amazing! I'm relieved to know that it's possible :)

Again today, the weather in my area was boring, so I tested out your script with the URL for Stillwater, Oklahoma (NWS link). There are six current weather headlines in effect for Stillwater (Severe T-storm Warning, Tornado Watch, Flash Flood Watch, Flood Advisory, Hazardous Weather Outlook, and a Short Term Forecast).

Running the script produces only one weather headline, the top-most headline, which in this case is the Severe Thunderstorm Warning.

If I could only have one headline, it would be the top-most, as this list is prioritized by the NWS to have the most pressing issue on top.

However, is it possible to grab all headlines, which at the moment would be six in Stillwater, OK?

I'm impressed and excited by the possibilities. I'd love to have the written forecast for the next day, as I currently only have the usual forecast (e.g. Clear H: 80 L: 45) More information than that would be very useful, so if you have something written for that, I'd take it too.

And yes, Tomge, there is actually another weather-related script I had in mind, but I don't want to burden you at the moment with more requests.
 

tomge

macrumors member
Dec 13, 2009
53
0
Belgium
No problem ;-)

Underneath you'll find the written forecast. I've been looking for the multiple warnings but for some reason there is only 1 warning today. =D
So waiting for more warnings and then I can poke around to get it right.

enjoy.

This scripts shows you the first warning (for now) and the written forecast (today's evening, tomorrow and tomorrows evening)
Code:
tell application "Finder"
	
	
	set web_content to do shell script "curl \"http://forecast.weather.gov/MapClick.php?map.x=225&map.y=66&site=oun&zmx=1&zmy=1\""
	-- this is the warning!!
	set AppleScript's text item delimiters to "<span class=\"warn\">"
	set warn to text item 2 of (web_content as string)
	set AppleScript's text item delimiters to "</span>"
	set warn to text item 1 of warn
	set AppleScript's text item delimiters to ""
	
	-- forecast for the oncomming days.
	set AppleScript's text item delimiters to "</span></a><br></div><br> "
	set forecast to paragraphs 2 thru end of (text item 2 of (web_content as string))
	set AppleScript's text item delimiters to "<br><br></td>"
	set forecast to text item 1 of (forecast as string)
	set AppleScript's text item delimiters to "<br><br><b>"
	set forecast to (text item 1 of forecast) & return & (text item 2 of forecast) & return & (text item 3 of forecast)
	set AppleScript's text item delimiters to "</b>"
	set forecast to every text item of forecast
	set AppleScript's text item delimiters to "<b>"
	set forecast to every text item of (forecast as string)
	set AppleScript's text item delimiters to ""
	
	return (warn & return & return & forecast as string)
end tell
 

typhoon7

macrumors newbie
Oct 6, 2009
16
0
WI's Lake Superior shoreline
No problem ;-)

Underneath you'll find the written forecast. I've been looking for the multiple warnings but for some reason there is only 1 warning today. =D
So waiting for more warnings and then I can poke around to get it right.

enjoy.

This scripts shows you the first warning (for now) and the written forecast (today's evening, tomorrow and tomorrows evening)
Code:
tell application "Finder"
	
	
	set web_content to do shell script "curl \"http://forecast.weather.gov/MapClick.php?map.x=225&map.y=66&site=oun&zmx=1&zmy=1\""
	-- this is the warning!!
	set AppleScript's text item delimiters to "<span class=\"warn\">"
	set warn to text item 2 of (web_content as string)
	set AppleScript's text item delimiters to "</span>"
	set warn to text item 1 of warn
	set AppleScript's text item delimiters to ""
	
	-- forecast for the oncomming days.
	set AppleScript's text item delimiters to "</span></a><br></div><br> "
	set forecast to paragraphs 2 thru end of (text item 2 of (web_content as string))
	set AppleScript's text item delimiters to "<br><br></td>"
	set forecast to text item 1 of (forecast as string)
	set AppleScript's text item delimiters to "<br><br><b>"
	set forecast to (text item 1 of forecast) & return & (text item 2 of forecast) & return & (text item 3 of forecast)
	set AppleScript's text item delimiters to "</b>"
	set forecast to every text item of forecast
	set AppleScript's text item delimiters to "<b>"
	set forecast to every text item of (forecast as string)
	set AppleScript's text item delimiters to ""
	
	return (warn & return & return & forecast as string)
end tell


I'm at work (Mac-less) currently, and now I can't wait to get home to try this!! Thanks, Tomge!

Pittsburg, TX is a hotspot at the moment, six weather warning/watch headlines there at the moment (NWS link).
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.