Skip to content

Instantly share code, notes, and snippets.

@ajerneck
ajerneck / ocr.sh
Created May 20, 2014 17:57
A shell script to batch ocr image pdfs. Requires tesseract, ImageMagick, and poppler.
# Copyright Alexander Jerneck 2014
# Licensed under the MIT license (http://opensource.org/licenses/MIT)
#!/bin/bash
## Script to batch ocr pdfs, by first converting them to tifs.
echo "usage: ocr PATTERN where PATTERN is a glob matching pdf files to be converted."
echo "example: ./ocr file-20*.pdf"
for x in $@
do