From 7a12c7ffa50d67f550592bf096e6ab4a42732983 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Wed, 2 Mar 2022 15:05:19 +1100 Subject: Add test data and images --- src/genTestImgs.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 src/genTestImgs.sh (limited to 'src/genTestImgs.sh') 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 + -- cgit v1.2.3