Created
August 12, 2019 18:45
-
-
Save allen0099/4e1707b768c7cd0989bd258b2a62a7a9 to your computer and use it in GitHub Desktop.
SITCON Camp 2019 產生大量可用 QR Code 點數
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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