Sort:  

Thank you for your reply, much appreciated! My python foo isn't very strong, but I'll give it a go and try out. Would be cool to have the ability to test it locally before publishing, just for fun.

Here is the code for this