Skip to content
Snippets Groups Projects

SABER QR CODE GENERATOR

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Vytor Calixto
    Edited
    qrCodeGen.sh 1.43 KiB
    LINES=$(wc -l saber.csv | cut -d' ' -f1)                                        
    mkdir QRCODES                                                                   
    mkdir crachas                                                                   
    echo $LINES linhas                                                              
    for i in $(seq 1 $LINES)                                                        
    do                                                                              
        echo Linha $i                                                               
        line=$(sed "${i}q;d" saber.csv)                                             
        name=$(echo $line | cut -d, -f2 | sed "s/'//g")                             
        email=$(echo $line | cut -d, -f3)                                           
        grr=$(echo $line | cut -d, -f4 | sed 's/GRR//g' | sed 's/grr//g')           
        wget "http://chart.apis.google.com/chart?cht=qr&chs=97x97&chl=${name}, ${grr}, ${email}"
        mv chart* "QRCODES/${name}.png"                                             
        convert cracha.png "QRCODES/${name}.png" -geometry +238+19 -composite c.png 
        width=$(identify -format %w c.png)                                          
        convert c.png -stroke '#000C' -strokewidth 2 -annotate +74+210 "${name}" -stroke none -fill white -annotate +74+210 "${name}" "crachas/${name}.png"
       sleep 1                                                                     
    done     
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment