A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
adapted docker-entrypoint script for alpine docker image (mainly how to install additional OCR languages)
Guy7e49d047b0b1
diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.shindex 38b8ac1da..f9fde70c8 100644--- a/scripts/docker-entrypoint.sh+++ b/scripts/docker-entrypoint.sh@@ -9,7 +9,7 @@ map_uidgid() {USERMAP_UID=${USERMAP_UID:-$USERMAP_ORIG_UID}if [[ ${USERMAP_UID} != "${USERMAP_ORIG_UID}" || ${USERMAP_GID} != "${USERMAP_ORIG_GID}" ]]; thenecho "Mapping UID and GID for paperless:paperless to $USERMAP_UID:$USERMAP_GID"- groupmod -g "${USERMAP_GID}" paperless+ addgroup -g "${USERMAP_GID}" paperlesssed -i -e "s|:${USERMAP_ORIG_UID}:${USERMAP_GID}:|:${USERMAP_UID}:${USERMAP_GID}:|" /etc/passwdfi}@@ -56,25 +56,24 @@ install_languages() {returnfi- # Update apt-lists- apt-get update-# Loop over languages to be installedfor lang in "${langs[@]}"; do- pkg="tesseract-ocr-$lang"- if dpkg -s "$pkg" > /dev/null 2>&1; then+ pkg="tesseract-ocr-data-$lang"++ # English is installed by default+ if [ "$lang" == "eng" ]; thencontinuefi-- if ! apt-cache show "$pkg" > /dev/null 2>&1; then++ if apk info -e "$pkg" > /dev/null 2>&1; then+ continue+ fi+ if ! apk info "$pkg" > /dev/null 2>&1; thencontinuefi- apt-get install "$pkg"+ apk --no-cache --update add "$pkg"done-- # Remove apt lists- rm -rf /var/lib/apt/lists/*}