Add filename argument for zip results

This commit is contained in:
stephan 2020-02-17 11:57:55 +01:00
parent 79043f3dd7
commit 6e87e0decd

12
nlp
View File

@ -36,10 +36,11 @@ def parse_arguments():
required=False,
type=int)
parser.add_argument('--zip',
action='store_true',
default=False,
default='vrt-results',
dest='zip',
help='package result files in zip bundles',
type=str,
help='''package result files in zip bundles takes a
string as a filename as an optional paramteer''',
required=False)
parser.add_argument('--check-encoding',
action='store_true',
@ -112,8 +113,9 @@ class NLPWorkflow(WorkflowRunner):
if zip:
vrt_zip_jobs = []
vrt_zip_job_dependencies = nlp_jobs
cmd = 'cd "%s" && zip -m vrt.zip */*.vrt -x "pyflow.data*" && cd -' % (
self.output_dir
cmd = 'cd "%s" && zip -m "%s".zip */*.vrt -x "pyflow.data*" && cd -' % (
self.output_dir,
self.zip
)
vrt_zip_jobs.append(
self.addTask(