summaryrefslogtreecommitdiff
path: root/hocrtotxtdir.sh
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-02-25 17:19:48 +0000
committerNick White <git@njw.name>2019-02-25 17:19:48 +0000
commit0aec35a060a9f9e1e33c18bf0e2af2aafd6a6257 (patch)
tree06681e52bf515814728e87c3971b50b178d9b480 /hocrtotxtdir.sh
Add various helper scripts
Diffstat (limited to 'hocrtotxtdir.sh')
-rw-r--r--hocrtotxtdir.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/hocrtotxtdir.sh b/hocrtotxtdir.sh
new file mode 100644
index 0000000..20c45a5
--- /dev/null
+++ b/hocrtotxtdir.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+usage="usage: $0 dirname"
+test $# -ne 1 && echo "$usage" && exit 1
+
+for i in "$1"/*hocr; do b=`basename "$i" .hocr`; d=`dirname "$i"`; ~/rescribe/2018-natphil/src/go/bin/hocrtotxt "$i" > "$d/$b.txt"; done