Franziska Kunsmann
5d4ca086e6
All checks were successful
bundlewrap/pipeline/head This commit looks good
21 lines
260 B
Bash
21 lines
260 B
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
DATE=$(date +%F_%H-%M-%S)
|
|
|
|
cd "$1"
|
|
|
|
convert *.tiff no_ocr.pdf
|
|
ocrmypdf -l deu no_ocr.pdf has_ocr.pdf
|
|
|
|
rm -f *.tiff
|
|
rm -f no_ocr.pdf
|
|
|
|
chown nobody:nogroup has_ocr.pdf
|
|
|
|
mv has_ocr.pdf "/srv/scansnap/${DATE}.pdf"
|
|
|
|
cd /
|
|
|
|
rm -r "$1"
|