Commit Graph

2 Commits

Author SHA1 Message Date
switham 6d94e5bf56 pdfcat and pagerange.py: error handling, stdout, misc.
modified:   LICENSE
    Added Steve Witham <switham_github@mac-guyver.com>

modified:   PyPDF2/pagerange.py
    Fixed some error handling.
    Made parse_filename_page_ranges return a list instead of being a generator.
    Tweaked a variable name for readability.

renamed:    Sample_Code/makepages.py -> Sample_Code/makesimple.py
also modified:
    Renamed the code to be similar to makesimple.sh.
    Changed the output file names to be the same as makesimple.sh makes.

modified:   Sample_Code/pdfcat
    Fixed to allow sending output to a file by redirection like with cat,
         pdfcat input*.pdf >output.pdf
    using
         output = os.fdopen(stdout.fileno(), "wb")
    I have not tested this in Windows, but the Python docs say the calls are
    supported in Windows.  The worst problem this could cause would be to
    silence PyPDF2's existing warning about the file being in text mode,
    while still actually writing in Windows text mode.
    Added examples to the --help output to show output-redirect style.

    Took out the caching of open input files.  Needless complication.

    Added a try...except so that if there's a problem while processing an
    input file, print the filename.

    Made quiet the default and --verbose an option.
2014-01-09 15:18:21 -05:00
Adam Coleman c59a212a4c First commit
Original PyPDF code. Updates should be coming from Noah soon.
2011-12-30 09:04:56 -06:00