[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

morituri and long names

Filed under: morituri,Python — Thomas @ 4:15 pm

2011-9-18
4:15 pm

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-9-19 @ 1:44 am

  2. metadata forever! So yes.

    Comment by Thomas — 2011-9-19 @ 7:46 am

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

    Comment by Paul Frields — 2011-9-20 @ 12:17 am

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

    Comment by Thomas — 2011-9-20 @ 8:51 am

  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 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

picture