Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Display real-time radio station info using Quicksilver Apps
I routinely listen to KEXP while studying, and listening to hear the name of a song I like is a pain. Luckily, KEXP puts up real-time song info for every track played. Going to the site, or even keeping it open, is too much work for me... Using a combination of AppleScript and the triggers built into Quicksilver, I have my computer set up to go to the site, get the song info, strip the hex info, and display it nicely with Quicksilver's Large Type feature -- in action, it looks like this.

I use this AppleScript to do the work. This one only works if you have the Lynx Terminal-mode browser installed (also available via Fink), though I am sure there are ways around that. Quicksilver is set up to have Command-Down Arrow automatically run this script. I have Command-Left/Right set to change tracks, and Up to pause. Any suggestions on improvements would be greatly appreciated!

[robg adds: Obviously this hint is quite specific to one radio station. However, by looking at the code, you can get an idea of you might make changes to strip info from other web pages (not just radio stations) and display that data using Quicksilver or a similar utility.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,553 views]  

Display real-time radio station info using Quicksilver | 12 comments | Create New Account
Click here to return to the 'Display real-time radio station info using Quicksilver' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Growl for the notification
Authored by: Diggory on Apr 05, '05 11:53:42AM

It's much more configurable.

---
*****
monkeyfood software - http://www.monkeyfood.com

[ Reply to This | # ]

Use Growl for the notification
Authored by: turnerm5 on Apr 05, '05 10:48:45PM

Well, as I already use Quicksilver... I don't see the need for a separate notification app...



[ Reply to This | # ]
Use Growl for the notification
Authored by: PancakeMan on Oct 05, '05 12:36:01PM
If anyone cares, here's the lines I wrote to replace the Quicksilver notification at the end of the script with Growl notification:
tell application "GrowlHelperApp"
	register as application "KEXP" all notifications {"Now Playing"} default notifications {"Now Playing"} icon of application "iTunes"
end tell

tell application "GrowlHelperApp"
	notify with name "Now Playing" title "Now Playing" description songname application name "KEXP"
end tell


[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: LC on Apr 05, '05 01:07:34PM
I think you may want to use curl for the http get; it's included in OS X and is perfect for scripts.

[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: tforrest on Apr 05, '05 01:15:13PM
yep, repace the first line the the script with:

set songname to do shell script "curl http://www.kexp.org/getsong.asp"
much easier than downloading lynx

[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: turnerm5 on Apr 05, '05 04:38:25PM

Thanks for the input... As you can probably tell by the script, this is my first attempt at making something useable. curl worked much better, btw.



[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: simplyodd on Apr 10, '05 05:36:24PM

Thanks so much for the main hint and the "curl" tip. You guys are great. For the other applescript newbies such as myself: When I copy/pasted the text into Script Editor it failed due to a capital A character with a tilde over it instead of a line break or something. I backspaced from the following line back over this char to make it one line and it then compiled ok. Save this as a Run Only script somewhere on your hd. I used my ~library/Scripts/applications/iTunes/. Then go to Quicksilver pref's, triggers and set up to run the script. To make the banner go away after you read it, just hit the return or enter key.

Again, thanks for the fantastic hint.
tom



[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: PancakeMan on Aug 01, '05 01:05:49PM

And thank YOU for the clarifying reply!

I thought iTunes scripts should go into ~/Library/iTunes/Scripts/ . I do know if placed there, they will appear on iTunes's Scripts menu. Is that also true of your placement?



[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: skellener on Apr 06, '05 12:38:22AM

I think that Synergy does the same thing as long as the stream has the song info.

http://wincent.com/a/products/synergy-classic



[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: turnerm5 on Apr 06, '05 12:52:11PM

Yeah, that's the problem... KEXP only lists the name of the track on kexp.org, so it's a pain to keep opening the site to see the name...



[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: richard_k_smith on Apr 06, '05 02:18:21AM

Thanks for this - it got me listening to KEXP, online which I can get over the air from time to time up here in Vancouver if the weather is just right...

Suggestion - optionally have the script loop (every 3 minutes is probably plenty) store song namein a variable and if the song name is different, put up the new name, otherwise, sleep..

...r



[ Reply to This | # ]
Display real-time radio station info using Quicksilver
Authored by: turnerm5 on Apr 06, '05 12:50:23PM

Hey, glad to hear that other people listen to KEXP as well... Anyway, since I only run this script when I WANT to see the name of the song, I have no use for it to store anything.



[ Reply to This | # ]