Skip to content

Instantly share code, notes, and snippets.

@allen0099
Created August 12, 2019 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allen0099/4e1707b768c7cd0989bd258b2a62a7a9 to your computer and use it in GitHub Desktop.
Save allen0099/4e1707b768c7cd0989bd258b2a62a7a9 to your computer and use it in GitHub Desktop.
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