mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/ocr.git
synced 2024-12-26 17:34:18 +00:00
Add zip fielname argument
This commit is contained in:
parent
6c4a642cb7
commit
880f0efcf9
24
ocr
24
ocr
@ -67,9 +67,9 @@ def parse_arguments():
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--zip',
|
'--zip',
|
||||||
action='store_true',
|
default='ocr-result-files',
|
||||||
default=False,
|
|
||||||
dest='zip',
|
dest='zip',
|
||||||
|
type=str,
|
||||||
help='package result files in zip bundles',
|
help='package result files in zip bundles',
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
@ -400,8 +400,9 @@ class OCRWorkflow(WorkflowRunner):
|
|||||||
all_zip_job_dependencies = (hocr_to_tei_jobs
|
all_zip_job_dependencies = (hocr_to_tei_jobs
|
||||||
+ pdf_merge_jobs
|
+ pdf_merge_jobs
|
||||||
+ txt_merge_jobs)
|
+ txt_merge_jobs)
|
||||||
cmd = 'cd "%s" && zip all.zip */*.{pdf,txt,xml} -x "pyflow.data*" && cd -' % (
|
cmd = 'cd "%s" && zip "%s"-all-files.zip */*.{pdf,txt,xml} -x "pyflow.data*" && cd -' % (
|
||||||
self.output_dir
|
self.output_dir,
|
||||||
|
self.zip
|
||||||
)
|
)
|
||||||
all_zip_jobs.append(
|
all_zip_jobs.append(
|
||||||
self.addTask(
|
self.addTask(
|
||||||
@ -413,8 +414,9 @@ class OCRWorkflow(WorkflowRunner):
|
|||||||
|
|
||||||
pdf_zip_jobs = []
|
pdf_zip_jobs = []
|
||||||
pdf_zip_job_dependencies = all_zip_jobs
|
pdf_zip_job_dependencies = all_zip_jobs
|
||||||
cmd = 'cd "%s" && zip -m pdf.zip */*.pdf -x "pyflow.data*" && cd -' % (
|
cmd = 'cd "%s" && zip -m "%s"-pdf.zip */*.pdf -x "pyflow.data*" && cd -' % (
|
||||||
self.output_dir
|
self.output_dir,
|
||||||
|
self.zip
|
||||||
)
|
)
|
||||||
pdf_zip_jobs.append(
|
pdf_zip_jobs.append(
|
||||||
self.addTask(
|
self.addTask(
|
||||||
@ -426,8 +428,9 @@ class OCRWorkflow(WorkflowRunner):
|
|||||||
|
|
||||||
txt_zip_jobs = []
|
txt_zip_jobs = []
|
||||||
txt_zip_job_dependencies = all_zip_jobs
|
txt_zip_job_dependencies = all_zip_jobs
|
||||||
cmd = 'cd "%s" && zip -m txt.zip */*.txt -x "pyflow.data*" && cd -' % (
|
cmd = 'cd "%s" && zip -m "%s"-txt.zip */*.txt -x "pyflow.data*" && cd -' % (
|
||||||
self.output_dir
|
self.output_dir,
|
||||||
|
self.zip
|
||||||
)
|
)
|
||||||
txt_zip_jobs.append(
|
txt_zip_jobs.append(
|
||||||
self.addTask(
|
self.addTask(
|
||||||
@ -439,8 +442,9 @@ class OCRWorkflow(WorkflowRunner):
|
|||||||
|
|
||||||
xml_zip_jobs = []
|
xml_zip_jobs = []
|
||||||
xml_zip_job_dependencies = all_zip_jobs
|
xml_zip_job_dependencies = all_zip_jobs
|
||||||
cmd = 'cd "%s" && zip -m xml.zip */*.xml -x "pyflow.data*" && cd -' % (
|
cmd = 'cd "%s" && zip -m "%s"-xml.zip */*.xml -x "pyflow.data*" && cd -' % (
|
||||||
self.output_dir
|
self.output_dir,
|
||||||
|
self.zip
|
||||||
)
|
)
|
||||||
xml_zip_jobs.append(
|
xml_zip_jobs.append(
|
||||||
self.addTask(
|
self.addTask(
|
||||||
|
Loading…
Reference in New Issue
Block a user