From d475271449c9d5d9fb10850499288f450b03e71c Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 23 Oct 2019 11:00:08 +0100 Subject: Add worst directory for fullocrdir script --- fullocrdir.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fullocrdir.sh b/fullocrdir.sh index 7be36c5..8454b66 100755 --- a/fullocrdir.sh +++ b/fullocrdir.sh @@ -78,5 +78,18 @@ find "$1" -maxdepth 1 -type f -name '*.jpg' | while read f; do cp "$hocrfn" "$1/best/" || exit 1 done +echo "Worst" +mkdir -p "$1/best/worst" || exit 1 +find "$1/best" -maxdepth 1 -type f -name '*.hocr' | while read f; do + b=`basename "$f" .hocr` + d=`dirname "$f"` + + conf="$1/$b.conf" + + if test $conf -lt 40; then + mv "$d/$d".* "$1/best/worst" || exit 1 + fi +done + echo "Graphing" bookgraph "$1" -- cgit v1.2.1-24-ge1ad