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

Launch RealAudio streams from the Terminal Desktop
This is not earth-shattering, but I like to listen to the RealAudio version of NPR's All Things Considered. However, I've grown tired of clicking on the web page to fire it up every time. Today I realized I could do this with a simple alias. In my .aliases file I added this:
alias realatc 'curl >
~/Desktop/atc3.smil; open ~/Desktop/atc3.smil'
That's all one line, by the way, but it's been shown on two lines to narrow it for display purposes. Add a space after the > sign and enter the text on one row if you're adding this to your .aliases file.

Now when I type 'realatc' in the Terminal, it downloads the daily All Things Considered RealAudio file to my desktop with curl, then opens that file, which launches RealOne and plays it for me.
  • Currently 5.00 / 5
  You rated: 5 / 5 (1 vote cast)

Launch RealAudio streams from the Terminal | 16 comments | Create New Account
Click here to return to the 'Launch RealAudio streams from the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Save the file to your mac and double-click it
Authored by: sjonke on Jul 24, '02 10:15:10AM

All you have to do is save the link to your mac from your browser (control or right click, Save As... or whatever is in your Web Browser that is equivalent). That will give you the .smil file. Double-click it to open it. Much easier than messing with unix aliases.

[ Reply to This | # ]
Save the file to your mac and double-click it
Authored by: derek23 on Jul 24, '02 10:49:25AM

Easier, mb, but not *nearly* as cool. ;)


[ Reply to This | # ]
Like the Grateful Dead?
Authored by: derek23 on Jul 24, '02 11:13:01AM

I'm probably the only one who does that will see this but what the hey... :)

alias gdair 'curl > ~/Desktop/gd.smil; open ~/Desktop/gd.smil'

[ Reply to This | # ]
Easier is relative
Authored by: mnoel on Jul 24, '02 11:11:24AM

I like the alias because I got tired of the multi-step process of:

* Switch to browser
* Jump to web page
* Click on link to download (I use OmniWeb)
* Double-click on downloaded file

I use the terminal and CLI a lot, so the alias is much quicker for me.

I also used curl to download all this year's Car Talk files. The web page does not show where these are, but it turns out they all reside in the same place as the current show and you can download any or all of them with curl.

Now if only I could convert the stream into an MP3 file...

[ Reply to This | # ]
MP3 Alternatives
Authored by: 12ftguru on Jul 24, '02 12:00:42PM

The only Real to MP3 options I have found are for PC and they only work sporadically. (Usually until REAL finds them and kills them)

There is a program called StreamRipper X ( which will rip a live stream to MP3. You would need to find a station with a RealMedia live stream of NPR.

Recently I have taken to scripting Coaster and iTunes to handle the conversions. I have an FM tuner connected to the my Mac. I use CRON to fire off the applescripts for the start / stop recording times. Then the files are handed off to iTunes for conversion.

It's kind of an ugly process, but it works.


[ Reply to This | # ]
MP3 Alternatives
Authored by: drjones on Jul 24, '02 01:40:09PM
from the FAQ (as of 7/11/2002):
Can streamripper record RealAudio streams, how about Windows Media? Nope, just MP3 streams. But it's an idea for the future.

[ Reply to This | # ]
MP3 Alternatives
Authored by: JohnnyMnemonic on Jul 24, '02 01:46:06PM
This American Life, at least, is archived at These files are available for a nominal fee--something like $2/archive. Until last week, there was no Mac support for for-pay Audible archives---but iTunes now supports exactly this kind of content, and when iPod 1.2 is released in a few weeks you'll be able to upload TAL archives to your iPod.

I don't know if the other NPR archives are kept there, but I think I've seen them there also. Personally, this was the most exciting announcement of Macworld for me, but maybe I'm square.

[ Reply to This | # ]
Easier is relative
Authored by: hombre on Jul 24, '02 01:01:00PM

The point of sjonke's post was perhaps not appreciated. You only have to save the link from your browser once. It can subsequently be opened to get the latest version of atc. So, e.g., (using launchbar), I "type <cmd-space> atc" and realone player launches and plays all things considered. Of course, if Real had included a bookmark feature, none of us would have had to think so hard about this.

[ Reply to This | # ]
Easier is relative addendum
Authored by: hombre on Jul 24, '02 01:13:35PM

Um, now that I think of it, doing what I described above doesn't quite work; you will only get the old broadcast the next day. What made it work was to edit the file so that it only contains the url. You may also need to make sure the file has the applicable type and creator codes. The same probably applies to the terminal method, i.e., if you edit the file, you won't need to do the curl each time.

[ Reply to This | # ]
Accessing Old CarTalk
Authored by: sudont on Jul 26, '02 02:51:29AM

Could you give us a little more detail on specifying and playing older CarTalk files? Thanks!

[ Reply to This | # ]
Easier is relative
Authored by: WAW401 on Jul 26, '02 12:41:17PM

I loved this hint because I don't catch NPR's Morning Edition anymore. But going to I realized that the equivalent ".smil" file was for Monday's program (this was Thurdsay!). The most current ME file has the date as part of it, so any automation would require the current date to be substituted. I decided this would be a good time to write my first shell script, so be kind :-). This might be applicable for other NPR files or other items that are date sensitive. Here is my double-clickable "PlayMorningEdition.command" script:


# This will calculate and format todays date in the format YYYYMMDD,
# download the NPR Morning Edition file to the desktop,
# then open it (presumably in RealOne Player)

theYear=`echo $theDate | awk '{ print $6 }'`
theMonth=`echo $theDate | awk '{ print $2 }'`
theDay=`echo $theDate | awk '{ print $3 }'`

case $theMonth in
"Jan" ) theMonth="01";;
"Feb" ) theMonth="02";;
"Mar" ) theMonth="03";;
"Apr" ) theMonth="04";;
"May" ) theMonth="05";;
"Jun" ) theMonth="06";;
"Jul" ) theMonth="07";;
"Aug" ) theMonth="08";;
"Sep" ) theMonth="09";;
"Oct" ) theMonth="10";;
"Nov" ) theMonth="11";;
"Dec" ) theMonth="12";;

curl$ > ~/Desktop/$
open ~/Desktop/$

[ Reply to This | # ]
Easier is relative
Authored by: WAW401 on Aug 01, '02 12:07:16PM

Update to script - it doesn't handle a single digit day (i.e. august 1st). So you'll have to add an evaluation if the day variable is 1 character, add a zero before it. Just noticed this, but haven't fixed yet myself.

[ Reply to This | # ]
Easier is relative
Authored by: meneermoot on Aug 04, '04 07:35:34AM

Actually you can simplify a little and get the 0 before the day and month by using and inlining the date command.

curl`date +%Y%m%d`.me.ram > ~/Desktop/`date +%Y%m%d`.me.ram
open ~/Desktop/`date +%Y%m%d`.me.ram

Note that those are backticks and not apostrophes.


[ Reply to This | # ]
Got 10.1.2?
Authored by: Anonymous on Jul 25, '02 07:23:07PM
* open script editor * type this: do shell script "curl > ~/Desktop/atc3.smil; open ~/Desktop/atc3.smil" * save as application et voila! (or okay, you can use the apple methods, but they're a touch more annoying:) tell application "URL Access Scripting" download "" to ((path to desktop as string) & ":atc3.smil") replacing yes set the_file to the result end tell tell application "RealOne Player" activate open the_file end tell

[ Reply to This | # ]
What do you do during the first 10 days of the month?
Authored by: OctavianMH on Aug 05, '02 11:00:15AM

This script is great, I love it, but how does one insert a '0' in front of the day when it's less than 10?

I assume it's something like this..

if ($theDate < 10) $theDate = `echo 0; $theDate`

but it seems that 'echo 0' also inserts a carriage return, which is bad. And I don't know if that's the right syntax for concatinating strings.

Any help would be appreciated!


[ Reply to This | # ]
What do you do during the first 10 days of the month?
Authored by: meneermoot on Aug 07, '04 06:28:26AM

Posted a reply in the main thread showing how to do what you want.


Mark Berger
Wellington, New Zealand

[ Reply to This | # ]