It has the same functionality as my old shell script, but now it's written in Python. The code is far from the most elegant it could be, but it's a decent example of how the new plugin API can be used for something practical.