diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index 10cff89..09516be 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -35,11 +35,13 @@ alias conedit='nm-connection-editor' # functions ocr() { - if [ -z $1 ]; then + file=$1 + if [ -z $file ]; then echo "Please input a file." return 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