python-scripts/scripts/QR_gen_sage/qr.py

14 lines
306 B
Python
Raw Normal View History

2022-10-10 21:32:42 +00:00
import pyqrcode
from pyqrcode import QRCode
# @author https://github.com/theadeyemiolayinka
s = input('Enter your URL:\n>')
f = input('Enter preferred file name (without extension):\n>')
# Generate QR code
url = pyqrcode.create(s)
# Create and save the png file
url.svg(f+'.png', scale = 8)