iTunes: What's a low WTF way to write scripts for questions like "What songs are only on my iPod"?
January 6, 2011 8:53 AM   Subscribe

Specifically: How can I write a script to find out what songs are on my iPod that aren't in my MacBook iTunes library? And, more generally: What's a convenient and low-WTF scripting languge/library/bridge for iTunes/mp3 scripting needs on OS X?

I'd strongly prefer one of the open and ubiquitous scripting languages (Perl, Python, Ruby, PHP, JavaScript, etc), but I'll consider other stuff.
posted by weston to Computers & Internet (7 answers total)
 
If you want to directly control iTunes, you need to use AppleScript. Many examples are here.
posted by mkb at 8:57 AM on January 6, 2011


Response by poster: I don't necessarily want to control iTunes directly, but I definitely want to be able to query & update my library, playlists, and iPod.
posted by weston at 9:05 AM on January 6, 2011


Well, there's this module for Perl, but it looks read-only.
posted by mkb at 9:12 AM on January 6, 2011


Any scripting language can be used to parse the XML iTunes Library file, but I think Applescript would be easiest as you can just query iTunes.

Also, not sure how you are going to get a list of music that's on your iPod.
posted by wongcorgi at 9:13 AM on January 6, 2011


You can use iRip to back up your iPod to a folder, then just use diff, I expect.

I've had 2 hard drive catastrophes in the past year and had to use it twice to restore from iPod.
posted by artlung at 11:17 AM on January 6, 2011


Oh, and once you get a unified library, you can use the "sync only checked songs" feature to keep a subset on your iPod when you sync.
posted by artlung at 11:18 AM on January 6, 2011


Either Applescript as mentioned above or peruse http://dougscripts.com/itunes/. Lots of stuff already there.
posted by PickeringPete at 12:54 PM on January 6, 2011 [1 favorite]


« Older I don't know what I'm capable of!   |   Deeply tired of having cold sores Newer »
This thread is closed to new comments.