summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-10-23 11:00:08 +0100
committerNick White <git@njw.name>2019-10-23 11:00:08 +0100
commitd475271449c9d5d9fb10850499288f450b03e71c (patch)
tree44e8edd34cbf9459c6287743d67fff82d6182234
parent37b0a4ab075a9b526a7ab8508282039f37355d93 (diff)
Add worst directory for fullocrdir script
-rwxr-xr-xfullocrdir.sh13
1 files changed, 13 insertions, 0 deletions
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"