From: W. Trevor King Date: Tue, 29 Jan 2013 17:27:18 +0000 (-0500) Subject: pdf-merge.py: Add -v/--version option X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8003741;p=blog.git pdf-merge.py: Add -v/--version option --- diff --git a/posts/PDF_bookmarks_with_Ghostscript/pdf-merge.py b/posts/PDF_bookmarks_with_Ghostscript/pdf-merge.py index 5c80fe2..4751b2f 100755 --- a/posts/PDF_bookmarks_with_Ghostscript/pdf-merge.py +++ b/posts/PDF_bookmarks_with_Ghostscript/pdf-merge.py @@ -369,6 +369,9 @@ if __name__ == '__main__': parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('input', metavar='PDF', nargs='+', help='an input PDF to merge') + parser.add_argument( + '-v', '--version', action='version', + version='%(prog)s {}'.format(__version__)) parser.add_argument('--ask', dest='pause_for_manual_tweaking', action='store_const', const=True, help='pause for manual pdfmark tweaking')