iTunes Explicit Lyrics tagging

Over in the comments of my EvilLyrics post, somebody asked for this script. It seems like people might find it handy, so here you go: explicit.txt

It will search the lyrics of all the songs in iTunes for “bad words” and flag those tracks as Explicit by adding the word “Explicit” to the end of the comments in the track.

Now, I have no use for this personally, but I can see where some people might. One thing you will have to do in order to use it is to edit it and define what you consider to be a “bad word”. Just after halfway through the script, there’s a section that looks like this:

badword1|badword2|badword3

Change that to define everything you consider to be a bad word. To use George Carlin’s famous example: shit|piss|fuck|cunt|cocksucker|motherfucker|tits

Just add as many words as you like, then run it like all the rest of these iTunes Javascripts. It’s reasonably smart and won’t tag a track as Explicit if the word Explicit is already in the comments.

You could use this for Smart Playlists, to make “clean” playlists, or to make “not so clean” playlists. Whatever you like. You could do that without this script too, but this makes it a bit easier.

iTunes Javascripts

Somebody on digg mentioned AppleScripting iTunes on the Mac, but it seems to be less well known that you can write Javascripts or VBScripts for iTunes for Windows.
So, here’s a bunch of scripts I’ve written for various tasks:

I’ve written more, but these are the most general purpose ones.

To use any of them, just download them, rename them to a *.js file, then run them like any other program (double click, select and press enter, type the name from a command prompt, etc). If you have all the defaults in XP or have the Windows Scripting Host installed on other Windows boxes, then the wscript.exe program actually runs the scripts, much like cmd.exe runs batch files. Same idea, anyway. The scripts connect to iTunes as a COM object and use it in that fashion. Works really well and is quite handy for scripting tasks in iTunes. Yeah, it doesn’t actually integrate or anything, but it’s still useful.