diff --git a/ocr b/ocr index 52bba3e..76088ae 100755 --- a/ocr +++ b/ocr @@ -286,11 +286,15 @@ class OCRPipeline(WorkflowRunner): ''' zip_jobs = [] if self.zip is not None: + # Remove .zip file extension if provided + if self.zip.endswith('.zip'): + self.zip = self.zip[:-4] + self.zip = self.zip if self.zip else 'output' cmd = 'cd "{}"'.format(self.output_dir) cmd += ' && ' cmd += 'zip' cmd += ' -r' - cmd += ' "{}_-_all" .'.format(self.zip) + cmd += ' "{}".zip .'.format(self.zip) cmd += ' -x "pyflow.data*" "*tmp*"' cmd += ' -i "*.pdf" "*.txt" "*.xml"' cmd += ' && ' @@ -305,7 +309,7 @@ class OCRPipeline(WorkflowRunner): cmd += 'zip' cmd += ' -m' cmd += ' -r' - cmd += ' "{}_-_pdf" .'.format(self.zip) + cmd += ' "{}".pdf.zip .'.format(self.zip) cmd += ' -x "pyflow.data*" "*tmp*"' cmd += ' -i "*.pdf"' cmd += ' && ' @@ -320,7 +324,7 @@ class OCRPipeline(WorkflowRunner): cmd += 'zip' cmd += ' -m' cmd += ' -r' - cmd += ' "{}_-_txt" .'.format(self.zip) + cmd += ' "{}".txt.zip .'.format(self.zip) cmd += ' -x "pyflow.data*" "*tmp*"' cmd += ' -i "*.txt"' cmd += ' && ' @@ -335,7 +339,7 @@ class OCRPipeline(WorkflowRunner): cmd += 'zip' cmd += ' -m' cmd += ' -r' - cmd += ' "{}_-_xml" .'.format(self.zip) + cmd += ' "{}".xml.zip .'.format(self.zip) cmd += ' -x "pyflow.data*" "*tmp*"' cmd += ' -i "*.xml"' cmd += ' && '