From 395f7272c3c86644b4b6809bc2184ee4fab7f21a Mon Sep 17 00:00:00 2001 From: trytomakeyouprivate <113100745+trytomakeyouprivate@users.noreply.github.com> Date: Sun, 14 May 2023 20:54:31 +0000 Subject: [PATCH 1/2] Added Fedora location & install commands --- HowToUseOCR.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/HowToUseOCR.md b/HowToUseOCR.md index b015f53d..e4ba9828 100644 --- a/HowToUseOCR.md +++ b/HowToUseOCR.md @@ -18,7 +18,7 @@ Depending on your requirements, you can choose the appropriate language pack for ### Installing Language Packs 1. Download the desired language pack(s) by selecting the `.traineddata` file(s) for the language(s) you need. -2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/4.00/tessdata` +2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/4.00/tessdata` (Debian) or `/usr/share/tesseract/tessdata` (Fedora) # DO NOT REMOVE EXISTING ENG.TRAINEDDATA, ITS REQUIRED. @@ -48,4 +48,29 @@ Add the following to your existing docker run command If you are not using Docker, you need to install the OCR components, including the ocrmypdf app. You can see [OCRmyPDF install guide](https://ocrmypdf.readthedocs.io/en/latest/installation.html) +Debian based systems, install languages with this command: +```bash +sudo apt update &&\ +# All languages +# sudo apt install -y 'tesseract-ocr-*' + +# Find languages: +apt search tesseract-ocr- + +# View installed languages: +dpkg-query -W tesseract-ocr- | sed 's/tesseract-ocr-//g' +``` + +Fedora: + +```bash +# All languages +# sudo dnf install -y tesseract-langpack-* + +# Find languages: +dnf search -C tesseract-langpack- + +# View installed languages: +rpm -qa | grep tesseract-langpack | sed 's/tesseract-langpack-//g' +``` From 220ef5ae1a61d7b1d70b134b2297aeba86b208c4 Mon Sep 17 00:00:00 2001 From: trytomakeyouprivate <113100745+trytomakeyouprivate@users.noreply.github.com> Date: Sun, 14 May 2023 20:59:21 +0000 Subject: [PATCH 2/2] changed APT install removed unnessecary Libreoffice core packages, these will be installed along. Changed all the python packages to pip3 instead of apt --- LocalRunGuide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LocalRunGuide.md b/LocalRunGuide.md index fb650f09..c3fe6972 100644 --- a/LocalRunGuide.md +++ b/LocalRunGuide.md @@ -90,8 +90,8 @@ Install the following software: For Debian-based systems, you can use the following command: ```bash -sudo apt-get install -y libreoffice-core libreoffice-common libreoffice-writer libreoffice-calc libreoffice-impress python3-uno unoconv pngquant unpaper ocrmypdf -pip3 install opencv-python-headless +sudo apt-get install -y libreoffice-writer libreoffice-calc libreoffice-impress unpaper ocrmypdf +pip3 install uno opencv-python-headless unoconv pngquant ``` For Fedora: