pdf-merge.py: Add -v/--version option
authorW. Trevor King <wking@tremily.us>
Tue, 29 Jan 2013 17:27:18 +0000 (12:27 -0500)
committerW. Trevor King <wking@tremily.us>
Tue, 29 Jan 2013 17:27:18 +0000 (12:27 -0500)
posts/PDF_bookmarks_with_Ghostscript/pdf-merge.py

index 5c80fe2bdd677d9d3571f482aa0625c7ea612e3d..4751b2f1f49522cbf6741f3f86704aae54d2a4e7 100755 (executable)
@@ -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')