I love Car Talk from Click and Clack and NPR. Since I live in France, I can't get it over the radio, but I do listen over the Internet. My favorite way to listen is to record a show to my iPod and then listen to it in the car on my way to the beach on the weekend -- the drive is about an hour long, and Tom and Ray make it easy to forget about the traffic.
I wanted to automate this process, but the URL for the RealAudio stream changes every week. So I wrote an AppleScript that figures out what this week's URL is, and I call that script from Audio Hijack every Tuesday morning. Audio Hijack then passes the file to iTunes when it's done with it, where it gets added to a Smart "CarTalk" playlist. VoilĂ -- Car Talk in my car, every week!
Script: CarTalkByWeek
set today to current date
set NewYearsDay to date "1/1" of today
set SecondsOfYear to today - NewYearsDay
set WeekOfYear to round SecondsOfYear / weeks + 1 rounding down
set ThisWeeksCarTalk to "05" & WeekOfYear
set CarTalkURL to "http://play.rbn.com/?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-01.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-02.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-03.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-04.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-05.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-06.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-07.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-08.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-09.ra?url=cartalk/cartalk/demand/CT" ¬
& ThisWeeksCarTalk & "-10.ra"
tell application "RealPlayer"
open clip with URL CarTalkURL
end tell
To do's...
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050623164705143