batch renaming iTunes directories

In partial response to the Ask Metafilter question “How can I rename my music folders on my Mac based on ID3 tags?“:

# - fix dir names created by iTunes
# only works for mp3s, and not actually tested on a Mac
# created by scruss on Sun Sep 4 22:05:00 EDT 2005

find "$@" -type d -mindepth 1 | while read directory
  artistdir=$(dirname "$directory")
  firstfile=$( find "$directory" -type f -iname '*.mp3' | head -n1 )
  year=$( id3info "$firstfile" | egrep ' TYE ' | sed 's/=== TYE (Year): //; s/[^0-9]*//;' )
  album=$( id3info "$firstfile" | egrep ' TAL ' | sed 's,=== TAL (Album/Movie/Show title): ,,;' )
  echo mv \'$directory\' \'$artistdir/\[$year\] $album\'

So if you were in the terminal, in your music library (one up from the individual artist directories), and you did: Dan\ Jones Tripping\ Daisy

you’d get:

mv 'Dan Jones/Get Sounds Now' 'Dan Jones/[2005] Get Sounds Now'
mv 'Dan Jones/One Man Submarine' 'Dan Jones/[2003] One Man Submarine'
mv 'Tripping Daisy/Jesus Hits Like the Atom Bomb' 'Tripping Daisy/[1998] Jesus Hits Like the Atom Bomb'

If that looks okay, run the output through the shell: Dan\ Jones Tripping\ Daisy | sh

and all should be well.

You’ll need id3lib, which is probably most easily installed from Fink. Also, this only works for mp3 files; I can’t grok the tag info for AAC files. And finally, this might go seriously screwy on weird characters in filenames. You know my feelings on that …

John Herald, RIP

I was sorry to hear that John Herald had died. We saw him play in Glasgow, just as he was recording Roll On John, his last — and probably only in-print — CD. He was a great entertainer.

The CD (linked above) was recorded with members of Radio Sweethearts, Battlefield Band and Belle & Sebastian. You’d like it.


Can I just say that Dressy Bessy‘s Electrified is currently rocking my world? Their noisy, joyous power-pop is a wonder to behold.

happy ears!

I always thought that earbuds would never work for me; they always seemed to fall out. While I like my Sennheiser open headphones, they need to be cranked up to almost full volume to hear over the TTC’s rumbling.

I just got a pair of Sony earbuds with different-sized earplugs, and sure enough, with the left ear set one size smaller, they stay in. They also sound great!

My Best of 2004

’tis the season, and since I’m not used to doing these things yet, and I can never give an album a numeric ranking, here are my Ten Best Music Albums of 2004, in alphabetical order:

  • The Animal Collective — Sung Tongs
  • The Arcade Fire — Funeral
  • Robyn Hitchcock — Spooked
  • Jolie Holland — Escondida
  • Joanna Newsom — The Milkeyed Mender
  • Of Montreal — Satanic Panic In The Attic
  • The Polyphonic Spree — Together We’re Heavy
  • Sterling Roswell — The Psychedelic Ubik
  • Jim White — Dig A Hole In That Substrate And Tell Me What You See
  • Brian Wilson — Smile

There are a lot of new artists that I hadn’t heard before this year.

Music that discovered me this year, although not necessarily released this year, includes:

  • Devendra Banhart
  • Calvin, Don’t Jump
  • The Decemberists
  • Dressy Bessy
  • The Fountains Of Wayne
  • The Handsome Family
  • Kristin Hersh
  • The High Water Marks
  • Bob Log III
  • Kate Rusby
  • The Sadies
  • Elliott Smith
  • Carl Stephenson

With my monstrous commute, I do listen to a lot of music now. And I like it.

b.log III

I like Bob Log III. He sounds like Beck or E in heavy disguise. Some of his music is definitely NSFW, but I think you might like:

If you like whacked-out electric slide blues, Bob Log III’s yer one mand band.

The Multi-Talented Mayor

One-man band singing sensation. Tapdancer. Comic book artist. Sometime mayoral candidate in Hamilton Donut Rock City. Is there no end to the talents of Mayor McCa? Why is he unknown outside Ontario?

I was on the guest list for his show at Lee’s Palace on Friday. CA was on first, so there wasn’t much of a crowd. This is the first time I’ve seen him in his one-man band persona. Much fun was had.

I recorded the show with the Mayor’s permission. I had the files online, but took them off when I ran out of space. Let me know if you want to hear them.

iRiver, youRiver, hesheitRivers

I just bought an iRiver H120 portable hard disk/audio player/recorder. It seems to work quite well with Linux, so far. Even at over 9MB/s, it’s taking a while to transfer my music collection.

I bought it from the terribly-named G-Wiz store in Scarborough Town Centre. I think it might’ve been a store return — there was some truly execrable music on it (Eminem and Kylie Minogue … bleah!), and the packaging was slightly open. Hmm.

i think i like emusic …

Just signed up for US $10 per month for unlimited download of some excellent artists, encoded as decent MP3s.

Here’s a sampling of what I’ve downloaded so far:

  • The Dickies
  • The Fall
  • Ewan MacColl
  • Jah Wobble
  • Gorp
  • James Taylor Quartet
  • Daniel Johnston
  • Holy Modal Rounders
  • Wesley Willis
  • Boards Of Canada
  • Perez Prado Orchestra
  • Young Fresh Fellows
  • Mayor McCA
  • Yo La Tengo
  • Dressy Bessy
  • The Fugs
  • Nusrat Fateh Ali Khan

Maybe I don’t like them all, but at least I haven’t paid extra to find that out.

Christian Anderson Smith, where were you in our hour of need?

Norvin just lent me a great CD; Welcome to McCALand, by Mayor McCA. It’s exactly my kind of music — quirky, folky, trippy, witty. Think Robyn Hitchcock sings Of Montreal.

What’s sad is that Christian Anderson Smith (aka Mayor McCA) doesn’t have a major recording contract. I had to go direct to the distributor, Sonic Unyon (phone 905-777-1223) to get his CDs. There’s no justice.