From 6b658812f0892ea99a229b1a02b085a41a0b17d8 Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Wed, 9 Oct 2024 22:30:58 +0300 Subject: [PATCH] FIXUP: Include more tessdata dirs --- dangerzone/util.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dangerzone/util.py b/dangerzone/util.py index f8823e1ad..5b2878b1c 100644 --- a/dangerzone/util.py +++ b/dangerzone/util.py @@ -51,12 +51,11 @@ def get_tessdata_dir() -> pathlib.Path: # # [1] https://tesseract-ocr.github.io/tessdoc/Installation.html tessdata_dirs = [ - pathlib.Path("/usr/share/tessdata/"), # on Debian + pathlib.Path("/usr/share/tessdata/"), # on some Debian pathlib.Path("/usr/share/tesseract/tessdata/"), # on Fedora - pathlib.Path( - "/usr/share/tesseract-ocr/tessdata/" - ), # ? (documented, but not encountered) - pathlib.Path("/usr/share/tesseract-ocr/4.00/tessdata/"), # on Ubuntu + pathlib.Path("/usr/share/tesseract-ocr/tessdata/"), # ? (documented) + pathlib.Path("/usr/share/tesseract-ocr/4.00/tessdata/"), # on Ubuntu Focal + pathlib.Path("/usr/share/tesseract-ocr/5/tessdata/"), # on Debian Trixie ] for dir in tessdata_dirs: