Mercurial > odfcast
diff mergeclient.py @ 63:3918c3c69485
Add ignore_file_errors option to mergeclient
Mergeclient is the example client implementation for merging pdf documents.
Therefore it should provide the option to ignore pdf file errors
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 12 Nov 2014 14:04:02 +0100 |
parents | a8c628466a9d |
children | 4645e50539ff |
line wrap: on
line diff
--- a/mergeclient.py Wed Nov 12 14:02:50 2014 +0100 +++ b/mergeclient.py Wed Nov 12 14:04:02 2014 +0100 @@ -13,6 +13,8 @@ parser.add_option("-s", "--host", default="localhost") parser.add_option("-p", "--port", default="5000") parser.add_option("-o", "--out", default="merged.pdf", dest="out") + parser.add_option("-i", "--ignore-file-errors", action="store_true", + default=False, dest="ignorefileerrors") (options, args) = parser.parse_args() if len(args) < 2: @@ -22,6 +24,9 @@ service = "merge" url = "http://%s:%s/%s/" % (options.host, options.port, service) + if options.ignorefileerrors: + url += "?ignore_file_errors=1" + files = [] for filename in args: