Created
March 14, 2013 13:26
-
-
Save ghoulmann/5161279 to your computer and use it in GitHub Desktop.
Mass QR-code generation using qrencode
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 | |
#To do: configure install for $1 | |
#To do: move script to acceptable path | |
#To do: generate conf in /etc for variables | |
#To do: SOLVE: last line must be \n or blank. We got something wrong. | |
list="./url-list.txt" #variable called list is a file in the current directory | |
URLS=$(cat $list) #creates var called URLS from file | |
i=0 #new variable to iterete and increment | |
#loop | |
printf %s "$URLS" | while IFS= read -r line | |
do | |
for url in $line | |
do | |
i=$(( $i + 1)) #increment | |
#echo "echo URL is $line" #troubleshooting | |
qrencode -s 5 -m 5 -o "./qr/$i.png" "$url" #create qr and stuff in subfolder called qr w/ a number equal to #i | |
echo "created ./qr/$i.png" #troubleshooting | |
#echo "total qr codes generated is $i" #troubleshooting | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment