Skip to content

Commit

Permalink
FIXUP: Include more tessdata dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
apyrgio committed Oct 9, 2024
1 parent 073a6e6 commit 6b65881
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dangerzone/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6b65881

Please sign in to comment.