Created
May 27, 2013 07:02
-
-
Save maxfell/5655560 to your computer and use it in GitHub Desktop.
makeQR
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
| import requests | |
| import console | |
| import Image | |
| import StringIO | |
| content = sys.argv[1] | |
| console.clear() | |
| print "Generating QR-Code for: " + content | |
| console.show_activity() | |
| r = requests.get("http://chart.apis.google.com/chart?chs=320x320&cht=qr&chl=" + content) | |
| i = Image.open(StringIO.StringIO(r.content)) | |
| i.save("qr.png") | |
| console.show_image("qr.png") | |
| console.hide_activity() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment