Update 51-ocr

This commit is contained in:
Alexandre
2021-09-22 19:24:10 +02:00
committed by GitHub
parent 5ae6c616bd
commit 218d58acc9

View File

@@ -3,15 +3,16 @@
# Install OCR if requested # Install OCR if requested
if bashio::config.has_value 'OCR'; then if bashio::config.has_value 'OCR'; then
if $(bashio::config 'OCR') = true; then if $(bashio::config 'OCR') = true; then
bashio::log.info 'Installing OCR' && \ bashio::log.info 'Installing OCR'
apk update
apk add --no-cache tesseract-ocr apk add --no-cache tesseract-ocr
# Install additional language if requested # Install additional language if requested
if bashio::config.has_value 'OCRLANG'; then if bashio::config.has_value 'OCRLANG'; then
bashio::log.info 'Installing OCR language' && \ bashio::log.info 'Installing OCR language'
apk add --no-cache tesseract-ocr-data-$(bashio::config 'OCRLANG') apk add --no-cache tesseract-ocr-data-$(bashio::config 'OCRLANG')
fi fi
elif $(bashio::config 'OCR') = false; then elif $(bashio::config 'OCR') = false; then
bashio::log.info 'Removing OCR' && \ bashio::log.info 'Removing OCR'
apk del tesseract-ocr.* apk del tesseract-ocr.*
fi fi
fi fi