mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-24 09:41:50 +02:00
Update 93-multiocr.sh
This commit is contained in:
@@ -4,16 +4,16 @@ OCRLANG=$(bashio::config 'OCRLANG')
|
|||||||
if [ -n "$OCRLANG" ]; then
|
if [ -n "$OCRLANG" ]; then
|
||||||
apt-get update &>/dev/null
|
apt-get update &>/dev/null
|
||||||
echo "OCRLANG variable is set, processing the language packages"
|
echo "OCRLANG variable is set, processing the language packages"
|
||||||
for i in $(echo "$OCRLANG" | tr "," " "); do
|
for i in $(echo "$OCRLANG" | tr "," " " "+"); do
|
||||||
if apt-cache show tesseract-ocr-"${i}" > /dev/null 2>&1; then
|
if apt-cache show tesseract-ocr-"${i}" > /dev/null 2>&1; then
|
||||||
echo "installing tesseract-ocr-${i}"
|
echo "installing tesseract-ocr-${i}"
|
||||||
apt-get install -y tesseract-ocr-"${i}"
|
apt-get install -y tesseract-ocr-"${i}"
|
||||||
|
|
||||||
# Downloading trainer data
|
# Downloading trainer data
|
||||||
# Downloading trainer data
|
# Downloading trainer data
|
||||||
cd /usr/share/tessdata
|
# cd /usr/share/tessdata
|
||||||
sudo rm -r $LANG.traineddata &>/dev/null || true
|
# sudo rm -r $LANG.traineddata &>/dev/null || true
|
||||||
wget https://github.com/tesseract-ocr/tessdata/raw/main/$LANG.traineddata &>/dev/null
|
# wget https://github.com/tesseract-ocr/tessdata/raw/main/$LANG.traineddata &>/dev/null
|
||||||
else
|
else
|
||||||
echo "package tesseract-ocr-${i} not found in the repository, skipping"
|
echo "package tesseract-ocr-${i} not found in the repository, skipping"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user