aboutsummaryrefslogtreecommitdiff
path: root/src/genTestImgs.sh
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-03-12 00:43:36 +1100
committerTerry Truong <terry06890@gmail.com>2022-03-12 00:43:36 +1100
commit542b2866682642f73ffd5ba6917f94c8c54603a0 (patch)
tree2e8dc5efbf477947a427d0ecf8c2cf9acc5f8d85 /src/genTestImgs.sh
parent60a299619fd89c7815d4cf58176d5ff9f35765c7 (diff)
Move images to public/
Diffstat (limited to 'src/genTestImgs.sh')
-rwxr-xr-xsrc/genTestImgs.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/genTestImgs.sh b/src/genTestImgs.sh
index 12dd114..a1dea28 100755
--- a/src/genTestImgs.sh
+++ b/src/genTestImgs.sh
@@ -1,6 +1,9 @@
#!/bin/bash
set -e
+#generate tol.json from tol.txt
+cat tol.txt | ./txtTreeToJSON.py > tol.json
+
#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]}' | \
@@ -8,6 +11,6 @@ cat tol.json | \
convert -size 200x200 xc:khaki +repage \
-size 150x150 -fill black -background None \
-font Ubuntu-Mono -gravity center caption:"$REPLY" +repage \
- -gravity Center -composite -strip assets/"$REPLY".jpg
+ -gravity Center -composite -strip ../public/img/"$REPLY".jpg
done