From: cypher.dp@... Date: 2007-07-21T20:05:34+09:00 Subject: Re: parsing iTunes Libary Thanks a lot everybody ! I tried plist but it didn't work. Don't ask me why. Know I'm using regexp similar to Ryan. Maybe I'll also have another look at libxml and so on. Dominik 2007/7/21, hengist podd : > Dominik wrote: > > I thought about writing something like that: > > http://code.google.com/p/itunes-to-rhythmbox-ratings/ > > > > I wanted to parse the library with REXML but the file is quite big. > > You could look into using libxml: > > http://libxml.rubyforge.org/ > http://raa.ruby-lang.org/search.rhtml?search=libxml > > > Another option would be to access iTunes via its COM (Windows) or Apple > event (OS X) API. e.g. Using rb-appscript > on OS X: > > #!/usr/bin/env ruby > > require 'appscript' > include Appscript > > t = app('iTunes').library_playlists[1].tracks > > t.name.get.zip(t.artist.get, t.rating.get).each do |name, artist, > rating| > p name, artist, rating > end > > > There's also a project to provide a common cross-platform API, although > I don't know how far on it is yet: > > http://rubyforge.org/projects/rb-itunes/ > > > HTH > > has > -- > http://appscript.sourceforge.net > http://rb-appscript.rubyforge.org > > -- > Posted via http://www.ruby-forum.com/. > >