From 0734839fcc70fa8d9d9691c8eba9b0739171ade3 Mon Sep 17 00:00:00 2001
From: Toke Eskildsen <te@ekot.dk>
Date: Mon, 13 Jan 2014 22:29:44 +0100
Subject: [PATCH] Rounded OCR accuracy to two digits after decoman point

---
 quack.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quack.sh b/quack.sh
index 3ba43d9..c9c7033 100755
--- a/quack.sh
+++ b/quack.sh
@@ -582,7 +582,7 @@ function processALTO() {
     local PHEIGHT=`echo $PTAG | sed 's/.*HEIGHT=\"\([^"]\+\)".*/\\1/g'`
     local PWIDTH=`echo $PTAG | sed 's/.*WIDTH=\"\([^"]\+\)".*/\\1/g'`
     ACCURACY=`echo $PTAG | sed 's/.*PC=\"\([^"]\+\)".*/\\1/g'`
-    ACCURACY=`echo "scale=2;$ACCURACY*100" | bc`
+    ACCURACY=`echo "scale=2;x=$ACCURACY*100/1; if(x<1) print 0; x" | bc`
 
     FULL_RELATIVE_HEIGHT=`echo "scale=6;$PHEIGHT/$PWIDTH" | bc | sed 's/^\./0./'`
     # TODO: Ponder how relative positioning works and why this hack is necessary
-- 
GitLab