I wrote something with MacRuby, finally. It’s a tool to help me post music every day over on my non-technical blog. The MacRuby part is that it uses iTunes to convert uncompressed audio to MP3, add metadata, and post it to my web site. And add it to my library along the way. That’s pretty cool. The script also uploads the track to my web site, but that’s straight Ruby.
In retrospect I think iTunes is not the right tool for this job. It’s a hammer, not a scalpel. It doesn’t give you a lot of fine control, and it takes more energy than the task really warrants. For example, sometimes I need to find a specific track in the library. The API iTunes offers through Scripting Bridge doesn’t let me look up a track by multiple criteria (track 28 from the album “Music Every Day” in MP3 format) – it just gives me the same keyword search you find in the UI. So I can search for the album “Music Every Day” and then loop through the returned tracks looking for the one I need. It gets the job done, but it’s not ideal.
So if I were starting over I might use LAME and RubyMp3info, or something. But it was interesting to get some practice with MacRuby, and if I ever decided to put a GUI on this it’ll be good to have had the experience. The code is on GitHub, if you’re curious.