From 0fe76423cf054285a814f4c5f64e66961f0d584e Mon Sep 17 00:00:00 2001 From: "Brock A. Martin" Date: Sun, 17 Jul 2016 14:04:43 -0500 Subject: [PATCH 1/2] Explicity tell zbarimg to expect a qrcode. --- qr2asc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qr2asc.sh b/qr2asc.sh index 8ead0e5..9f00665 100755 --- a/qr2asc.sh +++ b/qr2asc.sh @@ -52,7 +52,7 @@ for img in "$@"; do fi asc_key="${tmp_file}.${index}" echo "decoding ${img}" - chunk=$( zbarimg --raw ${img} 2>/dev/null | perl -p -e 'chomp if eof' ) + chunk=$( zbarimg --raw -Sdisable -Sqrcode.enable ${img} 2>/dev/null ) if [ $? -ne 0 ]; then echo "failed to decode QR image" exit 2 From aa3d6a2f775d090953c466426f6d3e5fcedec64f Mon Sep 17 00:00:00 2001 From: "Brock A. Martin" Date: Wed, 27 Jul 2016 22:55:11 -0500 Subject: [PATCH 2/2] switched to '--set' instead of '-S' flags for better readbility --- qr2asc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qr2asc.sh b/qr2asc.sh index 8c898cb..43f27ff 100755 --- a/qr2asc.sh +++ b/qr2asc.sh @@ -43,7 +43,7 @@ for img in "$@"; do fi asc_key="${tmp_file}.${index}" echo "decoding ${img}" - chunk=$( zbarimg --raw -Sdisable -Sqrcode.enable ${img} 2>/dev/null ) + chunk=$( zbarimg --raw --set disable --set qrcode.enable ${img} 2>/dev/null ) if [ $? -ne 0 ]; then echo "failed to decode QR image" exit 2