Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (20 sloc) 999 Bytes
SCRIPTDIR=$(dirname $0)
# Download the binaries (if not yet existing)
for lib in core javase; do
[ -e $SCRIPTDIR/zx-$lib.jar ] || wget$lib/$VERSION/$lib-$VERSION.jar -O $SCRIPTDIR/zx-$lib.jar
[ -e $SCRIPTDIR/jcommander.jar ] || wget -O $SCRIPTDIR/jcommander.jar
# Cleanup filenames that don't work well with scripts.
rename -v 'tr/ ()/___/' *
# Extract all the images.
for i in *.pdf; do pdfimages $i $i; done
# Convert all images to png.
for i in *.pbm *.ppm; do convert $i $i.png; rm $i; done
# Use `file` to identify all black&white images, then try to read the barcode using zxing.
for i in `file *.png | grep 1-bit | cut -f1 -d:`; do
java -cp $SCRIPTDIR/zx-core.jar:$SCRIPTDIR/zx-javase.jar:$SCRIPTDIR/jcommander.jar \ \
--pure_barcode --dump_results --brief ./$i
You can’t perform that action at this time.