Perl

xrayspx's picture

Updated Music Collection Browser

Music: 

Nick Cave And The Bad Seeds - The Weeping Song

I've made some much needed updates to my Music Collection Browser, and thought I'd mention it. It now does a case-insensitive sort of artist names, while ignoring leading special characters ( "'",":","(", etc), as well as throwing away leading "The"s for sorting. This was a big deal to me since it annoyed me every time I had to scroll through 50 The Whoevers to get the band I want.

I also fixed the compilations piece, so linked that back in. I just settled for big ugly links for soundtracks/compilations and individual artists at the top of whichever page is loaded. It sucks but there's really not much of a better way to go.

Now I just have to re-tag a few albums and artists to make things consistent, since some artists have both a "The" and "non-The" variant in the list, but at least now they're right next to each other.

Also, I want to vent about Gracenote. Fucking Gracenote. That is all. ... For many artists who have lots of featured guests, it appends all the "feat. whoever"s to the Artist tag. That is wrong. It should be appended, preferably in parentheses, to the song title itself. It's the only way to maintain a reasonable collection.

Of course, iTunes is stupid enough to create different artist folders based on this idiocy, so now I have 15 Bootsy Collins directories on the FS.

The goal list for this project, after 24 hours, now stands at:

  • iTunes XML files
  • Case Insensitivity for sorting
  • Throw away non-alpha/num leading characters to build the list ('Til Tuesday, :wumpscut:, (Cevin) Key, though it would break !!! if we owned any, or else it would just show up first, where 'Til Tuesday is now, which is fine)
  • Throw away leading "The"s for sorting, but only one, so as not to break The The, or Thes One
  • Better handling of compilations
  • Searching
  • Port to PHP?
  • Here's where I justify not crossing the rest of the items off my list:

    (1) I've barely bothered to look at iTunes XML files because every time I open one and try to make sense of it, I end up weeping to myself. I think what it's going to end up being is me taking my iTunes DB and munging into either sqlite3 (probably) or MySQL (unlikely), in a stripped down version of the same form that Amarok built its sqlite3 databases. I can't help but think that all the searches I run against the DB would be slow as hell if I was searching an unindexed XML file every time I do anything. So now I just need to write a perl script to parse the iTunes XML database file and puke out SQLite3 in a schema my site already handles.

    (2) I don't personally care much about searching. The point of this tool is so that when I'm in a record store or otherwise away from my computers I have quick access to an accurate copy of my CD collection, so I don't purchase dupe CDs or whatever. Or if someone asks me if I've heard of some band I can pull it up. Also, helpful links to YouTube, Wikipedia and Amazon searches for each artist. That's pretty useful really. Searching is irrelevant. The only place it would really be handy is if I send the page to someone else and they want to quickly find an artist or song, to which I say "Suck it up and scroll".

    (3) I was thinking of porting it to PHP just because I've written like, 6 lines of PHP and figured I should know it. This thing could stay Perl until Unix time rolls over and I wouldn't care at all.

    Find LDAP groups with obsolete users

    OpenLDAP has a nice "feature" that allows for group members to continue to exist, even if the user does not exist any more. Really handy! Problem is, if you, say, have a user in the "Domain Admins" group, and you delete that account, and then some normal user comes along with the same username, they will end up with unexpected elevated privileges.

    So I created a script that I run weekly that finds group members that no longer exist, and sends me a report. It also tells me which groups are empty.

    This relies on my toolbox... Find it here.

    Using some of our new tools

    Ok... Now that we have our toolbox Let's do something with it. Today we'll look at a simple solution to an everyday problem. Resetting a password.

    Subscribe to RSS - Perl