Skip to content

Commit

Permalink
allow passing language to mergepdf
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall authored Mar 6, 2025
1 parent 677aec4 commit 802ddac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/mergepdf/cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -eou pipefail

LANGUAGE=${1:-eng}
TMP_DIR=$(mktemp -d)
I=0
MAX_THREADS=${MAX_THREADS:-5}
Expand Down Expand Up @@ -52,7 +53,7 @@ while read -r URL; do
fi

# Make an OCR'd PDF from the image
tesseract "$local_img" "$TMP_DIR/img_$I" pdf > /dev/null 2>&1
tesseract -l "$LANGUAGE" "$local_img" "$TMP_DIR/img_$I" pdf > /dev/null 2>&1
rm "$local_img"
) &
PIDS+=("$!")
Expand Down
1 change: 1 addition & 0 deletions examples/mergepdf/scyllaridae.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ cmdByMimeType:
cmd: /app/cmd.sh
args:
- "%canonical"
- "%args"

0 comments on commit 802ddac

Please sign in to comment.