This has mutated into a more general purpose command line utility for exporting reports into html, opml, text, markdown or taskpaper with various filters.
I've finally got around to writing some documentation
HERE. Not quite finished, but a start...
There's still plenty more I want to add but it should be useable, particularly for exporting reports of completed tasks.