Skip to content

Commit

Permalink
Added python code for QR code generation
Browse files Browse the repository at this point in the history
The program when run generates a QR code(SVG file) for the specified link or text in the source code
  • Loading branch information
Yash2rule authored Oct 30, 2021
1 parent 3e31b2e commit 577ed57
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Python/qrcode_generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Run "pip install pyqrcode" or "pip3 install pyqrcode" before running this program
import pyqrcode

data = input("Enter the text or link to generate QR code: ")

# Using pyqrcode.create() to create a qr code of the input data
qr = pyqrcode.create(data)

# Using .svg method to save the qr code as SVG file of provided name & scale
qr.svg('qr_code.svg', scale = 8)

# Run "python3 <filename.py>" to execute the program
# The program will generate a QR code of the input in the same directory

0 comments on commit 577ed57

Please sign in to comment.