Re: [Rhythmbox-devel] [ques] convert itunes.xml to rhythmdb.xml?



On Wed, 2004-08-04 at 22:55 -0400, Mike Schroeder wrote:
> is there a way to convert my existing itunes library (library.xml) to
> something that rhythmbox can understand so all my ratings, play
> counts, etc will stay intact?
> 

I took a second stab at this, using python instead of xslt. It works a
lot better now. I've made a simple python script that you can easily
modify to fit your needs. You pretty much just need to edit the script
to tell it where your Windows drives are mounted in linux. There are a
few other defaults you can modify too if you want. It seems to import my
entire iTunes library just fine, preserving ratings and playcounts where
I have them, but I haven't done an exhaustive check or anything.

The script is at: http://www.blergl.net/~jfortier/itunes2rhythm.py

The script could use a little bit of polishing: it could be made to
prompt the user for drive mappings instead of requiring the script to be
edited. Or, it could take a lot of this stuff in on the command line.
For extra snazziness, it could merge the rhythmdb and itunes db files
instead of just replacing the rhythmdb with the converted itunes db. If
this is something that might get distributed with rhythmbox, I might get
ambitious and try to put those finishing touches on.

I developed this with python 2.3. It might work with earlier python 2.x
versions, but I haven't tried. Naturally, you need the python xml
libraries for it to work.

Hope this helps.

Jacques



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]