[shell] refine ocr output filename

This commit is contained in:
Marco Thomas
2022-11-27 20:06:28 +01:00
parent 5c47035847
commit d0fb29674d

View File

@@ -35,11 +35,13 @@ alias conedit='nm-connection-editor'
# functions # functions
ocr() { ocr() {
if [ -z $1 ]; then file=$1
if [ -z $file ]; then
echo "Please input a file." echo "Please input a file."
return return
fi fi
ocrmypdf -l deu+eng+jpn --output-type pdf $1 OCR_$1 name=${file%%.*}
ocrmypdf -l deu+eng+jpn --output-type pdf $file ${name}.ocr.pdf
} }
# deprecated # deprecated