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. ;)
Awesome work. Sorry for my delay. I was reviewing your code the other day, and then I fell into another dimension of reality and forgot that merging it in would be a useful thing to do.
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. ;)