Spam (madbodger) wrote,

  • Location:
  • Mood:
  • Music:
I was musing on how to help someone rearrange the genres in iTunes. The data is stored in one great big XML file, so going through it by hand with a text editor would be annoying. If I were doing it myself, I'd just write a quick XSLT script to do the work. But that would involve knowing all the strings in advance and having access to the XML. I could write one script to emit all the unique genre tags, and then have a second script to apply them. But editing big complicated XSLT scripts isn't for the faint-hearted either (an XSLT script is just a big ugly XML file, you see). Well, I could write an XSLT script that takes an XML description and generates the desired XSLT script automatically. And I could make it generic, so the (small, rational to edit) XML configuration file could specify things like:

<replace what="genre" from="rock alternative" to="alternative">

That way, it could fix genres, album names, whatever. But realistically, it would be (much) easier to just offer to fix the iTunes XML myself.

Tags: hacking

  • Turntable reminiscences

    My first record player was a cheap red and white plastic affair with which I could play my stack of bright yellow 78s. It was the kind that had a…

  • Fixing a Kodak Carousel slide projector

    I was going through old family slides with the old family slide projector and noticed the focus motor was running continuously. I did some quick…

  • Old-style Polaroid photography

    One day, fizzgig and I were shopping at a knickknack store and found chromed resin casts of old cameræ. We remarked how they would fit our…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic