while read bugfix
This commit is contained in:
parent
018bebf307
commit
e1d64e8bbc
1 changed files with 8 additions and 3 deletions
|
@ -2,6 +2,11 @@ set -x
|
||||||
|
|
||||||
DOKUMENT_DIR=/home/simono41/data1/Dokumente
|
DOKUMENT_DIR=/home/simono41/data1/Dokumente
|
||||||
|
|
||||||
for file in $(find ${DOKUMENT_DIR} -path ${DOKUMENT_DIR}/.stversions -prune -o -name "*.pdf" ! -name '*-ocr.pdf' -print); do
|
find ${DOKUMENT_DIR} -path ${DOKUMENT_DIR}/.stversions -prune -type f -o -name "*.pdf" ! -name '*-ocr.pdf' -print | while read file; do
|
||||||
ocrmypdf -l deu --force-ocr --jbig2-lossy ${file} ${file%.*}-ocr.pdf
|
if ! [ -f "${file%.*}-ocr.pdf" ]; then
|
||||||
|
ocrmypdf -l deu --force-ocr --jbig2-lossy "${file}" "${file%.*}-ocr.pdf"
|
||||||
|
sleep 1
|
||||||
|
else
|
||||||
|
echo "Datei wurde bereits verarbeitet"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue