boekhouding-beancount/scripts/ocr-image.sh
2025-06-29 23:51:10 +02:00

9 lines
163 B
Bash
Executable file

#!/bin/bash -eux
in=$1
out=$(dirname "$in")/$(basename -- "$in" ".${in##*.}").pdf
tmp=$(mktemp --suffix=.pdf)
magick "$in" "$tmp"
ocrmypdf $tmp "$out"
rm "$tmp"