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???
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.
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.
osascript /path/to/script/current_music_itunes.scpt
# 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
♫ Now Playing: Sounds of Life (feat. Jasmine Yee) / Pendulum / Hold Your Colour
♫ Now Playing Stream: Hot 108 Jamz / Mary J Blige - Mr. Wrong (Ft Drake) / Hip Hop / Rap
<?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>
curl --silent "http://INSERTIP:32400/clients" | grep -o 'name="\([^"]*\)"' | sed -e 's/name="//' -e 's/"//'
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>>>![]()
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![]()
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
Yes i did exactly as you wrote it....
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
[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)
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' |
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