Skip to content

Instantly share code, notes, and snippets.

@benwaffle
Last active April 29, 2021 23:53
Show Gist options
  • Save benwaffle/d9361669b21af8aa4b7af1c2692f598d to your computer and use it in GitHub Desktop.
Save benwaffle/d9361669b21af8aa4b7af1c2692f598d to your computer and use it in GitHub Desktop.
#!/bin/bash
BG=(lightblue palegreen rosybrown1)
FG=(blue sienna purple)
i=0
jq -r '. | map(.text) | .[]' ./*.json | while read -r str; do
echo $i
convert -size 1280x720 -background "${BG[((i % ${#BG[@]}))]}" -fill "${FG[((i % ${#FG[@]}))]}" -gravity Center -pointsize 52 "caption:$str" "$i.png"
((++i))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment