kanzure/pdfparanoia — pull request #23 by cathalgarvey (2013-03-21 23:57:32+00:00)
Title: Updated terminal script to use argparse.

If 2.6 isn't a target, then argparse is available from 2.7 onwards. Argparse has a nicer and more explicit coding style, and generates helpful errors and linux-styled usage information, in addition to automatically offering a -h / --help command for help.

To make this work though, the usage has changed slightly; output is now either stdout by default or directed to a file with -o / --output, input is either stdin or given as an arg, and rather than "-v" and "-vv", "-v"/"--verbose" and "-V"/"--more-verbose" are specified as such, with the latter implying the former.

Tests still pass (I didn't touch the core module) and this appears to work on some PDFs I have lying around using piping or file specification, so I think it's a drop-in replacement otherwise.

Just discovered pdfparanoia today while looking into paperbot again. Awesome work! Delighted to add this to my toolkit. ;)