Skip to content

Instantly share code, notes, and snippets.

@douglasgoodwin
Created July 1, 2014 20:22
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 douglasgoodwin/2a266ee9397237295474 to your computer and use it in GitHub Desktop.
Save douglasgoodwin/2a266ee9397237295474 to your computer and use it in GitHub Desktop.
Batch QR codes
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