Archive for the ‘code’ Category

Importing Playlists from iTunes to Banshee

Saturday, October 24th, 2009

I've been using Banshee for my music listening needs the past few months after using iTunes for a very, very long time. I never got around to importing my iTunes playlist, mainly because there weren't any good solutions when I first looked into it a few months ago. This weekend I finally imported all of my iTunes info (play counts, playlists, ratings) using a great script found here.

However, it didn't work for me right off the bat. For some reason, the file size in my iTunes library didn't match the file size reported by Banshee. Also, the database format appears to have changed slightly since the script was originally written. Here is a copy of the modified script, which just has two changed lines of code. Hopefully this is helpful to somebody and be sure to thank the author of the original script if it is!

This American Life

Sunday, November 11th, 2007

If you enjoy listening to This American Life on NPR and don't find their weekly free podcast enough, here's a little script to download all of their old episodes. It probably isn't condoned, but I figure that if I had listened to the show from the start and taped them off of the radio they wouldn't have minded, so trying to charge listeners to dip into past shows seems pretty arbitrary. I'd rather just donate to NPR as a whole. I adapted some code from here so that it works on any system with python installed . Here are step-by-step instructions for MacOSX/Linux/whatever:

  1. Copy and paste the code below into a file called '''download.py'''. Save it in your home directory.
  2. Start up the terminal (/Applications/Utilities/Terminal.app), type '''python download.py''' and hit enter.
  3. All of the shows (up to #342) will be downloaded to your home folder. Shows #5 and #8 don't seem to exist.
#!/usr/bin/env python
from urllib import urlretrieve
import urllib2
for i in range(1,5) + range(6,8) + range(9,389):
urllib2.urlopen("http://audio.thisamericanlife.org/jomamashouse/ismymamashouse/%d.mp3" % i)
urlretrieve("http://audio.thisamericanlife.org/jomamashouse/ismymamashouse/%d.mp3" % i, "%d.mp3" % i)
print "Succesfully downloaded %d.mp3" % i

Update (Sept 12, 2009): I verified that the script still works and it goes up to episode #389 now.


fetishroom