As the "final commit" mentions, 387 days and 330 commits after the I started, tvnamer and tvdb_api are at a point where I'm happy to release "version 1.0"!
tvnamer is probably of most interest, it's an automagical TV episode renamer, turning files from "some.show.s01e01.hdtv.blah.avi" to "Some Show - [01x01] - The Real Episode Name.avi", using information from thetvdb.com
This is a simple Python implementation. Note the global variables p and a should in general be re-generated each pass. p is any prime and a is the primitive root of p.
Something I always missed from Foobar2000 is the option to "Stop playback after current song"
For some reason it never occurred to me it would be trivial to write an AppleScript to mimic this for iTunes..
tell application "System Events"
set cur_app to name of the first process whose frontmost is true
set visible of process cur_app to false
end tell
tell application "iTunes"
set last_track_id to id of current track
set last_track_name to name of current track
repeat while true
set cur_track_id to id of current track
if not last_track_id = cur_track_id then
stop playing
exit repeat
end if
delay 0.5
end repeat
end tell
Paste that into the "Script Editor" application (in /Applications/Applescript/). File > Save As. Change filetype to Application, uncheck "Startup Screen" and put it in your Applications folder. Launch it via Quicksilver. Done.
Read-on to see how the script got to this point (not terribly interesting, but might-possibly be informative)...
After looking for a way to import Python modules when given a valid filepath I came across a description of a technique to do so here.
What I did not like about this approach was the use of null_module. In his approach you needed to have a module called null_module somewhere in your PYTHONPATH. This was then cloned and the information about the actual module you wish to report overwrites this module. In short, he was using null_module as a skeleton module for the import. This is unnecessary.