Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SITCON Camp 2019 產生大量可用 QR Code 點數
#!/bin/bash
# Author: 秉虎
TOKEN=""
COIN=""
DESCRIPTION=""
GENERATE_URL="https://camp-api.sitcon.party/generate"
# Change the number for how many you want to generate
for c in {1..10}
do
echo "Repeat $c now..."
COUPON="$(curl --data "token=$TOKEN&coin=$COIN&description=$DESCRIPTION" $GENERATE_URL | cut -d '"' -f 4)"
echo "Done!"
echo "coupon is $COUPON"
wget https://chart.googleapis.com/chart\?cht\=qr\&chs\=240x240\&chl\=$COUPON -O "./$COUPON.png"
done
# Make all QR code to one file
# tile is depend on what image you want to generate
#ffmpeg -pattern_type glob -i "*.png" -filter_complex tile=5x2 out.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment