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.
Now I am not used to Geek tools from coming over from rainmeter but here is a simple rainmeter script that I would like to use but don't really k now how to convert it to a Geeklet

This is a simple icon with tell you the % of rain for the day.

Any thoughts???

My Ultimate Weather Python script will be able to grab the % precipitation from certain sites. I'm still working on this script, albeit slowly due to work taking up more time. So if you can wait a while, you'll get this, but I don't have the time right now to write a one off script just to get this information.
 
Rain %

No worries just appreciate tour time. Is there an easy way to convert a Rainmeter file to a Geeklet?
 
My Desk Top

Thanks for all the help I got from this forum to make some of these geeklets.
 

Attachments

  • Screen Shot 2012-02-15 at 10.17.14 AM.png
    Screen Shot 2012-02-15 at 10.17.14 AM.png
    938.4 KB · Views: 412
Is there a way use the "Image" geeklet to do stuff like open applications or websites? Because I created an iPhone/iPad-inspired desktop complete with icons, now want to make them actually do stuff. E.g. when I click "Youtube" it opens to youtube.com, or if I click "Calculator" it opens calculator, etc.

My desktop is attached to give you an idea of what I'm talking about. Currently, only weather, clock, calendar and unread mail counter work.
 
Is there a way use the "Image" geeklet to do stuff like open applications or websites? Because I created an iPhone/iPad-inspired desktop complete with icons, now want to make them actually do stuff. E.g. when I click "Youtube" it opens to youtube.com, or if I click "Calculator" it opens calculator, etc.

My desktop is attached to give you an idea of what I'm talking about. Currently, only weather, clock, calendar and unread mail counter work.

use icons?
 
Hey guys/gals, I've been using bowtie for quite sometime now, but I saw someone using a geektool script itunes and it and it looks like this:

Iph1l.png


I have tried looking around for it, but I've been unsuccessful.

Thanks for any help.
 
Hey guys/gals, I've been using bowtie for quite sometime now, but I saw someone using a geektool script itunes and it and it looks like this:

Image

I have tried looking around for it, but I've been unsuccessful.

Thanks for any help.

I just modified my iTunes Geeklet script to do this, since it looked cool. It supports both streams (iTunes Radio) and your audio files. Hopefully this is what you're looking for. I tested about 5 web streams, so hopefully it supports them all.

This is Applescript, so you'll need to open up the Applescript Editor, paste these shenanigans into the program, and save as current_music_itunes.scpt.

Call the program in your Geeklet with
Code:
osascript /path/to/script/current_music_itunes.scpt
Code:
# ITUNES CURRENT MUSIC
# ROBERT WOLTERMAN (xtacocorex)
# I MODIFIED THIS FROM SOMEWHERE ON THE INTERNETS, BUT CANNOT REMEMBER WHERE
# 
# THIS CODE WORKS IF YOU ARE LISTENING TO AUDIO FILES OR WEB STREAMS THROUGH ITUNES

# CHECK TO SEE IF ITUNES IS OPEN
tell application "System Events" to set iTunesIsRunning to (name of processes) contains "iTunes"
if iTunesIsRunning is false then
	return "iTunes is not open"
end if
# DON'T REMEMBER WHAT THIS IS FOR
tell application "System Events"
	set powerCheck to ((application processes whose (name is equal to "iTunes")) count)
	if powerCheck = 0 then
		return ""
	end if
end tell
# GLOBAL VARIABLES
set newline to "
" as text
set header to "♫ Now Playing" as text
# DO STUFF IF ITUNES IS OPEN
if iTunesIsRunning is true then
	tell application "iTunes"
		# GET INFORMATION WE NEED
		set theURL to the current stream URL as text
		set theStream to the current stream title as text
		if player state is playing then
			# WE ARE LOOKING AT A MUSIC FILE
			if theURL is "missing value" and theStream is "missing value" then
				# WE HAVE A FILE, SO SET BOOLEAN APPROPRIATELY
				set haveFile to true
				# GET THE TRACK DATA
				set sartist to artist of current track
				set strack to name of current track
				set salbum to album of current track
			else
				# WE ARE LOOKING AT A MUSIC STREAM
				# SET THE haveFile BOOLEAN APPROPRIATELY
				set haveFile to false
				# GET THE TRACK DATA
				set stitle to current stream title as text
				set sname to name of current track
				set scategory to category of current track
				# UNSURE IF scategory HAS VALUE SO CHECK AND SET AS NEEDED
				if scategory is "missing value" then
					set scategory to ""
				end if
				set sdesc to description of current track
				# UNSURE IF sdesc HAS VALUE SO CHECK AND SET AS NEEDED
				if sdesc is "missing value" then
					set sdesc to ""
				end if
			end if
		end if
		# IF WE'RE PAUSED, UPDATE THE FOOTER VARIABLE
		if player state is paused then
			set footer to " / paused" as text
		else if player state is stopped then
			# IF WE'RE STOPPED, UPDATE THE FOOTER VARIABLE
			set footer to " / stopped" as text
		else
			# SET TO NOTHING AS IT'S PLAYING
			set footer to "" as text
		end if
		
		# SET THE INFORMATION TO BE DISPLAYED
		if haveFile then
			# INFO FOR THE FILE
			set info to header & ": " & strack & " / " & sartist & " / " & salbum & footer as string
		else
			# INFO FOR THE STREAM
			if theStream is "missing value" then
				set info to header & " Stream" & sname & " / " & sdesc & footer as string
			else
				set info to header & " Stream: " & sname & " / " & theStream & " / " & scategory & footer as string
			end if
		end if
		# RETURN info TO BE DISPLAYED
		return info
	end tell
end if

Output examples:
File
Code:
♫ Now Playing: Sounds of Life (feat. Jasmine Yee) / Pendulum / Hold Your Colour

Web Stream (Hot 108 Jamz is the internets best hip hop, at least that's what they say, it is pretty good too)
Code:
♫ Now Playing Stream: Hot 108 Jamz / Mary J Blige - Mr. Wrong (Ft Drake) / Hip Hop / Rap
 
I tunes

Great work but can't get the geeklet to work. The AS runs fine

"♫ Now Playing: A Place Called Morning / Bill Douglas / A Place Called Morning"

Geeklet command:


osascript /Users/twosavy/Documents/current_music_itunes.scpt

What am I doing wrong>>>:eek:
 
I'm not very good with this. So I'l try and ask here.

I'm trying to use Geektool on my Mac Mini to show the people watching movies from my Plex Media Server. Plex do give me a xml file to have fun with.

I can go to: http://SERVERIP:32400/clients

Gives me this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1">

<Server name="CUMPUTERNAME" host="10.0.1.21" address="10.0.1.21" port="3000" machineIdentifier="LONGNUMBER" version="0.9.5.2-06ca164" />

</MediaContainer>



I would like to fetch only the COMPUTERNAME in this and have it listed out with Geektool.

I have figuered that i have to use curl at least to fetch specific data from a XML file. But I'm not entirely sure what the commands are to fetch that data. Or remove all the other data.

Would be great if anyone could help me out here :)

[SOLVED]
Edit:
Got it working after alot of googling:
Code:
curl --silent "http://INSERTIP:32400/clients" | grep -o 'name="\([^"]*\)"' | sed -e 's/name="//' -e 's/"//'

It now outputs the name of the Plex Clients connected to it.
(Seems like it only shows Clients on LAN using the server. Not on WAN. Bummer :p
 
Last edited:
Great work but can't get the geeklet to work. The AS runs fine

"♫ Now Playing: A Place Called Morning / Bill Douglas / A Place Called Morning"

Geeklet command:


osascript /Users/twosavy/Documents/current_music_itunes.scpt

What am I doing wrong>>>:eek:

Set the encoding in the Geeklet to unicode.
 
I'm not very good with this. So I'l try and ask here.

I'm trying to use Geektool on my Mac Mini to show the people watching movies from my Plex Media Server. Plex do give me a xml file to have fun with.

I can go to: http://SERVERIP:32400/clients

Gives me this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1">

<Server name="CUMPUTERNAME" host="10.0.1.21" address="10.0.1.21" port="3000" machineIdentifier="LONGNUMBER" version="0.9.5.2-06ca164" />

</MediaContainer>



I would like to fetch only the COMPUTERNAME in this and have it listed out with Geektool.

I have figuered that i have to use curl at least to fetch specific data from a XML file. But I'm not entirely sure what the commands are to fetch that data. Or remove all the other data.

Would be great if anyone could help me out here :)

[SOLVED]
Edit:
Got it working after alot of googling:
Code:
curl --silent "http://INSERTIP:32400/clients" | grep -o 'name="\([^"]*\)"' | sed -e 's/name="//' -e 's/"//'

It now outputs the name of the Plex Clients connected to it.
(Seems like it only shows Clients on LAN using the server. Not on WAN. Bummer :p

Well damn, I wrote you a nice python script that doesn't require the regex. You can find it here: http://xtacocorex-geektool-scripts.googlecode.com/files/plexserverclientlist.py

Here are the script options:
Code:
Options:
  -h, --help            show this help message and exit
  -w WEBADDRESS, --webaddress=WEBADDRESS
                        Specify the URL to feed into the script
  -t HEADER, --header=HEADER
                        Header of the output if wanted, script defaults to
                        Plex Media Server Client List
  -d, --debug           Enable debugging


----------

Neg no change AS working fin but not Geeklet

This may be a dumb question, but did you save the Applescript code as current_music_itunes.scpt?
 
background problem

I have a couple geek tool scripts running in a group for date time and weather. Everything works fine except for one huge problem:

Some of the scripts (Date) are not staying in the background as part of the desktop image. For some reason, some of the scripts are showing up in the foreground while i browse the web or check my email!

This is very annoying and frustrating

Somebody please help....
 
i tunes

Again i need to say i am sorry. Another stupid mistake by me. After your last post I about the script name i checked it again with a different pair of eye glasses and low and behold found a extra . that didn't belong there. Your work is great. The script works wonders. Believe it or not this has all been a helping tool for all of us new geekers out there. Keep up the good work for this is one geeker who appreciates your time and effort in this forum..
 
Well damn, I wrote you a nice python script that doesn't require the regex. You can find it here: http://xtacocorex-geektool-scripts.googlecode.com/files/plexserverclientlist.py

Worked excelent.

I have also made a geeklet to get filenames of my downloads in my SABnzbd queue. But with regex I feel I have limited options to edit how the result is shown in the end.

I took a look at some of your RSS feed python scripts and I think with some editing in them they can work for this purpose. But I'm not very steady with python.

SABnzbd gives me this RSS feed to play with: http://pastebin.com/f7tYqUb7

It's basicly a normal RSS feed. But instead of:
<items>
<item>
-data
</item>
</items>

It gives me
<jobs>
<job>
- data
</job>
<job>
-data
</job>
</jobs>

Would be great if u could check if your RSS scripts can easily be edited to do this task.

Result would be a list of all the <job></job>, something like:
timeleft - filename - mb
 
Worked excelent.

I have also made a geeklet to get filenames of my downloads in my SABnzbd queue. But with regex I feel I have limited options to edit how the result is shown in the end.

I took a look at some of your RSS feed python scripts and I think with some editing in them they can work for this purpose. But I'm not very steady with python.

SABnzbd gives me this RSS feed to play with: http://pastebin.com/f7tYqUb7

It's basicly a normal RSS feed. But instead of:
<items>
<item>
-data
</item>
</items>

It gives me
<jobs>
<job>
- data
</job>
<job>
-data
</job>
</jobs>

Would be great if u could check if your RSS scripts can easily be edited to do this task.

Result would be a list of all the <job></job>, something like:
timeleft - filename - mb

I think this should do it for you: http://xtacocorex-geektool-scripts.googlecode.com/files/SABnzbdQueue.py

Using Terminal.app, here is what I get with the information you pasted into pastebin:
Code:
[20:56:55][taco@pacos-taco-stand]$ python SABnzbdQueue.py -w sabnzbdqueuedata.xml
SABnzbd DOWNLOADS: IDLE  TIME LEFT: 0:00:00
                           FILENAME                             MB LEFT    MB     (H:MM:SS)
 Fringe.S02E20.720p.BluRay.x264-SiNNERS                            0.00/ 1780.84  (0:00:00)
 Fringe.S02E21.720p.BluRay.x264-SiNNERS                            0.00/ 1780.77  (0:00:00)
 Fringe.S02E22.720p.BluRay.x264-SiNNERS                            0.00/ 1781.97  (0:00:00)
 Fringe.S02E23.720p.BluRay.x264-SiNNERS                            0.00/ 1780.79  (0:00:00)
 Conan.2012.02.09.Carol.Burnett.720p.HDTV.x264-BAJSKORV            0.00/ 1305.85  (0:00:00)

Similar to the last script for you, update the URL variable in the code or specify the url on the on the command line with the -w option. I had the data local on the machine, but you'll want the http: business.
 
Help!

New to Geektool - so I gotta ask. I am running the following but there are huge gaps between the title of the story and the story itself. How can I reduce the size of the gaps?

Thank you,

#!/bin/sh

URL="http://sports.espn.go.com/espn/rss/nhl/news"
if [ $# -eq 2 ] ; 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' |
 
New to Geektool - so I gotta ask. I am running the following but there are huge gaps between the title of the story and the story itself. How can I reduce the size of the gaps?

Thank you,

#!/bin/sh

URL="http://sports.espn.go.com/espn/rss/nhl/news"
if [ $# -eq 2 ] ; 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' |

I just updated my RSS Feed Grabbing python script that works for general RSS Feeds. I actually had to modify it to work with the NHL news feed link you posted, so thanks for helping make this script better.

Here is the link to the Wiki on how to use it: http://code.google.com/p/xtacocorex-geektool-scripts/wiki/RSSFeedGrabHowTo

The download link is contained on that page.

Here is a quick setup for you to run:
Code:
python /path/to/script/rss_feed_grabv3.py -g -w http://sports.espn.go.com/espn/rss/nhl/news
 
I just updated my RSS Feed Grabbing python script that works for general RSS Feeds. I actually had to modify it to work with the NHL news feed link you posted, so thanks for helping make this script better.

Here is the link to the Wiki on how to use it: http://code.google.com/p/xtacocorex-geektool-scripts/wiki/RSSFeedGrabHowTo

The download link is contained on that page.

Here is a quick setup for you to run:
Code:
python /path/to/script/rss_feed_grabv3.py -g -w http://sports.espn.go.com/espn/rss/nhl/news

Thank you very much - it's starting to come together.
 
xtacocorex |*rss_feed_grabv3.py to dropbox_feed_Ggrabber

Hey there, hey xtacocorex,

i have been trying to combine the nice layout function (as in group by date) of xtacocorex rss_feed_grabv3.py with the remove_html_tags of the dropbox_feed_grabber.

after hours of crashing into pyhton, i didnt get closer then modding the dropbox_feed_grabber script, having each dropbox decription filed unter its according date. but they are not grouped.

i would appreciate if you could help me out here.

thx for all your shared expertise anyhow
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.