Home > Projects > Streamripper

Podcasting is the current tech fad. Geeks have been doing basically the same thing, way before it was easy. I wrote a script to download regularly-scheduled radio shows off the Internet and put them on my iPod. The shows are automatically deleted after you listen to them. I originally wrote the script to rip "Fresh Air"; the current version rips "The Writer's Almanac" (my commute is much shorter now).

The script is for OS X.

  1. First, you will need to install a utility called streamripper.
  2. Install the Mac::AppleScript library from CPAN. You can do this by typing
    perl -MCPAN -e shell
    to start CPAN interactively, and then issuing the command
    install Mac::AppleScript
  3. Then install this script and this library file wherever you like (/usr/local/bin or ~/bin/, for example).
  4. Find a radio station that plays your show and streams on the Internet.
  5. Set up a crontab entry to run the script whenever the show airs. For example, my crontab entry for The Writer's Almanac looks like this:
    30 7    * * *   cd ~/bin/Streamripper ; ./rip-writers-almanac.pl -u http://wxpr.dwave.net:8005/wxpr64k -d 30 -l 290
    The -u flag is the URL for streamripper to connect to; the -l flag is the length of time to record (in seconds). The -d flag is the number of seconds to delay before recording; it is optional. I just used it to trim the chit-chat before Garrison starts talking.
  6. Create an iTunes playlist called "Ripped", and tell iTunes to copy this playlist to your iPod. Your show should start magically appearing there.

These are very minimal instructions, because I'm not sure anyone will even be interested in this script. If you're interested, and have any questions or problems, please email me at mark-abbott@earthlink.net.