remove force-ocr for only scan documents

This commit is contained in:
Simon Rieger 2022-02-12 00:08:06 +01:00
parent e1d64e8bbc
commit f52bd317a1

View file

@ -4,7 +4,7 @@ DOKUMENT_DIR=/home/simono41/data1/Dokumente
find ${DOKUMENT_DIR} -path ${DOKUMENT_DIR}/.stversions -prune -type f -o -name "*.pdf" ! -name '*-ocr.pdf' -print | while read file; do
if ! [ -f "${file%.*}-ocr.pdf" ]; then
ocrmypdf -l deu --force-ocr --jbig2-lossy "${file}" "${file%.*}-ocr.pdf"
ocrmypdf -l deu+eng -c --jbig2-lossy --tesseract-timeout 60 "${file}" "${file%.*}-ocr.pdf"
sleep 1
else
echo "Datei wurde bereits verarbeitet"