From 52f234781413091a1902ad297bb9d42981b792b1 Mon Sep 17 00:00:00 2001 From: Bastien Le Querrec <blq@laquadrature.net> Date: Wed, 6 Mar 2024 18:24:51 +0100 Subject: [PATCH] ppparis: saute l'OCRisation des pages avec des trop grandes images --- ppparis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppparis.py b/ppparis.py index e8b4faa..a67434e 100755 --- a/ppparis.py +++ b/ppparis.py @@ -158,7 +158,7 @@ for a in soup.find_all('a', href=True): logging.info(f'Nouveau fichier : {name} ({date}). URL : {url}') download_file(url, __DATA_DIR+filename) - cmd = ['ocrmypdf', '-l', 'eng+fra', '--output-type', 'pdfa', '--redo-ocr', __DATA_DIR+filename, __DATA_DIR+filename] + cmd = ['ocrmypdf', '-l', 'eng+fra', '--output-type', 'pdfa', '--redo-ocr', '--skip-big', '500' , __DATA_DIR+filename, __DATA_DIR+filename] logging.debug(f'Lancement de ocrmypdf: {cmd}') try: output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) -- GitLab