[ rexroof.com ] [ biking ] [ blog ] [ work ] [ disposable ] [ crap ] [ code ] [ phone ] [ pictures ] [ yank ] [ url ] [ linklog ]

Tuesday, October 19, 2004

iMunge

Currently my iTunes houses 27,798 songs, and while that's not the most I've ever had, it is a considerable amount. Sometimes I can spend hours just renaming songs and fixing the info in iTunes. It's easy if you just need to highlight some songs and set the artist and album info. But if the track numbers or the artists on a compilation are stored in the song's name and you want to get it in the right fields so you can sort on it, then it becomes tedious.

Using Mac::Glue I've written some Perl scripts that let me easily highlight some songs and run a script in the terminal and it changes the info. Problem is I kept having to edit the script for every job I needed done. I decided to generalize this script into a single program that I just pass command line arguments to and it will modify the songs you have either selected or you can specify a playlist to modify.

The result is iMunge. (colorized source) (download) (examples)

here's a quick example of it working:

69 Love Songs, Vol. 2 - Magnetic Fields - 01 - Roses
69 Love Songs, Vol. 2 - Magnetic Fields - 02 - Love is Like Jazz
69 Love Songs, Vol. 2 - Magnetic Fields - 03 - When My Boy Walks Down the Street
69 Love Songs, Vol. 2 - Magnetic Fields - 04 - Time Enough for Rocking When We're Old
69 Love Songs, Vol. 2 - Magnetic Fields - 05 - Very Funny
69 Love Songs, Vol. 2 - Magnetic Fields - 06 - Grand Canyon
69 Love Songs, Vol. 2 - Magnetic Fields - 07 - No One Will Ever Love You
69 Love Songs, Vol. 2 - Magnetic Fields - 08 - If You Don't Cry
69 Love Songs, Vol. 2 - Magnetic Fields - 09 - You're My Only Home
69 Love Songs, Vol. 2 - Magnetic Fields - 10 - (Crazy for You But) Not That Crazy

the command:

imunge -s -d- -N 3 -A 1 -T 2 -L 0

sorts all of this info out and puts it in it's proper ID3 tags via itunes. pretty nifty.

0 Comments:

Post a Comment

<< Home