papermerge-multilangocr initial release

This commit is contained in:
aptalca
2020-10-02 19:15:36 -04:00
parent 69f8a2efb7
commit 7c15bfbf14
7 changed files with 25 additions and 68 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/with-contenv bash
if [ -n "$OCRLANG" ]; then
echo "OCRLANG variable is set, processing the language packages"
apt-get update
for i in $(echo "$OCRLANG" | tr "," " "); do
if apt-cache show tesseract-ocr-"${i}" > /dev/null 2>&1; then
echo "installing tesseract-ocr-${i}"
apt-get install -y tesseract-ocr-"${i}"
else
echo "package tesseract-ocr-${i} not found in the repository, skipping"
fi
done
fi