silenced unpaper, optipng for cleaner output

moved parser settings to settings
removed forgiving ocr (now default) since tesseract is plenty accurate even without defining the correct language.
This commit is contained in:
Jonas Winkler
2020-11-01 23:23:42 +01:00
parent e534c7c49f
commit 6adc870a20
4 changed files with 33 additions and 64 deletions

View File

@@ -60,7 +60,7 @@ class DocumentParser:
out_path = os.path.join(self.tempdir, "optipng.png")
args = (self.OPTIPNG, "-o5", in_path, "-out", out_path)
args = (self.OPTIPNG, "-silent", "-o5", in_path, "-out", out_path)
if not subprocess.Popen(args).wait() == 0:
raise ParseError("Optipng failed at {}".format(args))