[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

morituri and long names

Filed under: morituri,Python — Thomas @ 16:15

2011-09-18
16:15

After ripping over a 1000 CD's perfectly, and having problems on a few (bad discs, weird audio, a few small niggles to fix), I ran into a fun failure.

Apparently, the file name in u'morituri/Sufjan Stevens - Illinois/02. Sufjan Stevens - The Black Hawk War, or, How to Demolish an Entire Civilization and Still Feel Good About Yourself in the Morning, or, We Apologize for the Inconvenience but You\'re Going to Have to Leave Now, or, "I Have Fought the Big Knives and Will Continue to Fight Them Until They Are Off Our Lands!".flac' is too long for my NAS.

Thank you Mister Sufjan. In your honour, I added a function to morituri to shrink the filename to a power of two minus one, below either the given length or 128 characters, whichever is less. For now the algorithm splits on spaces and changed the file name to morituri/Sufjan Stevens - Illinois/02. Sufjan Stevens - The Black Hawk War, or, How to Demolish an Entire Civilization and Still Feel Good About Yourself.flac

That is good enough for me... I was worried I had to teach this one tiny function about keeping quoted pieces together, or how comma's work, or how 'or, ' works, and so on, just to satisfy my crazy sense of aesthetics.

5 Comments »

  1. Full name’s still in the metadata though eh?

    Comment by MH — 2011-09-19 @ 01:44

  2. metadata forever! So yes.

    Comment by Thomas — 2011-09-19 @ 07:46

  3. By the way, that’s an absolutely brilliant album. Thanks for supporting independent music by buying it!

    Comment by Paul Frields — 2011-09-20 @ 00:17

  4. Support is the sole reason I still buy CD’s.

    Comment by Thomas — 2011-09-20 @ 08:51

  5. I’m still not a big Sufjan fan, but yes, the reason I still buy CD’s is exactly because I want to the world filled with good indie-like music.

    Comment by Thomas — 2011-10-19 @ 11:29

RSS feed for comments on this post. TrackBack URL

Leave a comment

picture