[shell] refine ocr output filename
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user