aboutsummaryrefslogtreecommitdiff
path: root/src/genTestImgs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/genTestImgs.sh')
-rwxr-xr-xsrc/genTestImgs.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/genTestImgs.sh b/src/genTestImgs.sh
new file mode 100755
index 0000000..34e3921
--- /dev/null
+++ b/src/genTestImgs.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -e
+
+#reads through tol.json, gets names, and generates image for each name
+cat tol.json | \
+ gawk 'match ($0, /"name"\s*:\s*"(.*)"/, arr) {print arr[1]}' | \
+ while read; do
+ convert -size 400x400 xc:khaki +repage \
+ -size 300x300 -fill black -background None \
+ -font Ubuntu-Mono -gravity center caption:"$REPLY" +repage \
+ -gravity Center -composite -strip assets/"$REPLY".jpg
+ done
+