Originally written in Python because it's an easy language and I was speedcoding this at 6:00. In hindsight this is a good shell script problem, so I wrote it again in that (it would have been my goto language if I didn't have a python setup waiting for the clock to hit 6:00).