Created
July 1, 2014 20:22
-
-
Save douglasgoodwin/2a266ee9397237295474 to your computer and use it in GitHub Desktop.
Batch QR codes
This file contains 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
import qrcode | |
qr = qrcode.QRCode( | |
version=5, | |
error_correction=qrcode.constants.ERROR_CORRECT_M, | |
box_size=10, | |
border=2, | |
) | |
link = 'http://qr.metro.net/stops/10222/' | |
link = link.encode('ascii', 'xmlcharrefreplace') | |
qr.add_data(link) | |
qr.make(fit=False) | |
img = qr.make_image() | |
img.save('hi.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment