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, required=False,
type=int) type=int)
parser.add_argument('--zip', parser.add_argument('--zip',
action='store_true', default='vrt-results',
default=False,
dest='zip', 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) required=False)
parser.add_argument('--check-encoding', parser.add_argument('--check-encoding',
action='store_true', action='store_true',
@ -112,8 +113,9 @@ class NLPWorkflow(WorkflowRunner):
if zip: if zip:
vrt_zip_jobs = [] vrt_zip_jobs = []
vrt_zip_job_dependencies = nlp_jobs vrt_zip_job_dependencies = nlp_jobs
cmd = 'cd "%s" && zip -m vrt.zip */*.vrt -x "pyflow.data*" && cd -' % ( cmd = 'cd "%s" && zip -m "%s".zip */*.vrt -x "pyflow.data*" && cd -' % (
self.output_dir self.output_dir,
self.zip
) )
vrt_zip_jobs.append( vrt_zip_jobs.append(
self.addTask( self.addTask(