osvobozena_dochazka/tools/process.bash

10 lines
742 B
Bash
Raw Normal View History

2024-12-02 18:05:26 +01:00
!#/bin/bash
2024-12-03 15:07:18 +01:00
cat students.json | jq -c '.Zaci[]| select(.AktivniEvidence == true) |{id: .PkZak, name: .Jmeno, surname: .Prijmeni }' | while read line; do
2024-12-02 18:05:26 +01:00
id=$(echo $line | jq -r '.id')
name=$(echo $line | jq -r '.name')
surname=$(echo $line | jq -r '.surname')
echo "Processing $name $surname "
2025-01-13 14:07:34 +01:00
qrencode -o "qrcodes/$id.png" "$line"
2024-12-02 18:05:26 +01:00
convert -size 1000x640 xc:white templates/background.png -geometry 500x460+0+200 -composite templates/logo.png -geometry 420x100+40+40 -composite -background transparent -fill black -size 420x240 -font templates/Quicksand-VariableFont_wght.ttf caption:"$name\n$surname" -geometry +40+220 -composite qrcodes/$id.png -geometry 420x420+540+140 -composite "cards/$name-$surname.png"
done