Aquagen presents Klub Kraft - I - 17 - central seven - te quiero
Aquagen presents Klub Kraft - I - 12 - die kreuzritter - der komtur
Aquagen presents Klub Kraft - I - 09 - bobmarley vs funkster deluxe remix - sun is shining
Aquagen presents Klub Kraft - I - 08 - moby - why does my heart
first thing I do is to highlight the songs I want to change, then I ran this:
those options break down as follows:imunge -s -n -d '-' -L 0 -T 2 -N 4 -A 3
-s: I've got the songs I want to change highlighted in iTunesthis is the output from running that command:
-n: just print what would be done. I highly suggest this before you do any changes.
-d '-': the delimiter. this is telling the script to split up the name by a dash.
-L 0: this says that the album title is element 0 of the array that results in the split on the track name. the elements start numbering at 0
-T 2: this says the track number will be in element 2
-N 4: the new track name will be in element 4
-A 3: the artist name is in track 3
N: "te quiero" A: "central seven" T: "17" L: "Aquagen presents Klub Kraft" N: "der komtur" A: "die kreuzritter" T: "12" L: "Aquagen presents Klub Kraft" N: "sun is shining" A: "bobmarley vs funkster deluxe remix" T: "09" L: "Aquagen presents Klub Kraft" N: "why does my heart" A: "moby" T: "08" L: "Aquagen presents Klub Kraft"
second example:
these tracks are in a playlist named "bands" and have these song names:
(04) belle and sebastian - like dylan in the movies
(05) belle and sebastian - mayfly
(06) belle and sebastian - me and the major
(10) belle and sebastian - the fox in the snow
this is the command I ran:
those options break down like this:imunge -p "bands" -n -r '\((\d+)\) (belle and sebastian) - ([a-z ]+)' -P '$3' -T 1
-p "bands": I've got the songs I want to change in a playlist called bands. this will change all songs in that playlist.
-n: no changes. test like this before you run anytyhing!
-r '\((\d+)\) (belle and sebastian) - ([a-z ]+)': this is the regular expression that matches the song name. with parens around the things I want to capture
-P '$3': -P says to edit the song name inline and the '$3' is the replacement string. I could have accomplished the same thing with -N 3
-T 1: the track number is in $1.
N: "like dylan in the movies" T: "04" N: "mayfly" T: "05" N: "me and the major" T: "06" N: "the fox in the snow" T: "10"