mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-17 22:03:32 -04:00
switch to hybrid
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# Multi Language OCR - Docker mod for papermerge and paperless-ng
|
||||
# Multi Language OCR - Docker mod for papermerge and paperless-ng/x
|
||||
|
||||
This mod adds multi language OCR packages to papermerge and paperless-ng, to be installed/updated during container start.
|
||||
This mod adds multi language OCR packages to papermerge and paperless-ng/x, to be installed/updated during container start. Keep in mind that you still have to enable the languages in the app itself, as this mod only installs the system language packs.
|
||||
|
||||
In papermerge/paperless-ng docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:papermerge-multilangocr` to enable this mod.
|
||||
In papermerge/paperless-ng/x docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:papermerge-multilangocr` to enable this mod.
|
||||
|
||||
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:papermerge-multilangocr|linuxserver/mods:papermerge-mod2`
|
||||
|
||||
Then set an environment variable named `OCRLANG` and set it to the language codes that follow `tesseract-ocr-` from [this page](https://packages.ubuntu.com/focal/tesseract-ocr-all). You can add multiple codes that are comma separated, with no spaces.
|
||||
|
||||
For example, if you want to enable OCR for Chinese Simple and Belarusian, you'd set the var as `-e OCRLANG="chi-sim,bel"`.
|
||||
For example, if you want to enable OCR for Chinese Simple and Belarusian, you'd set the var as `-e OCRLANG="chi-sim,bel"`.
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ -n "$OCRLANG" ]; then
|
||||
echo "**** OCRLANG variable is set, processing the language packages ****"
|
||||
for i in $(echo "$OCRLANG" | tr "," " "); do
|
||||
if apt-cache show tesseract-ocr-"${i}" > /dev/null 2>&1; then
|
||||
if ! dpkg -s tesseract-ocr-"${i}" >/dev/null 2>&1; then
|
||||
echo "**** Adding tesseract-ocr-${i} to package install list ****"
|
||||
echo "tesseract-ocr-${i}" >> /mod-repo-packages-to-install.list
|
||||
else
|
||||
echo "**** tesseract-ocr-${i} is already installed, skipping ****"
|
||||
fi
|
||||
else
|
||||
echo "**** package tesseract-ocr-${i} not found in the repository, skipping ****"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
+1
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
+1
@@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-papermerge-multilangocr-add-package/run
|
||||
Reference in New Issue
Block a user