-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from ananyag309/master
QR code generator
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## **QR Code Generator** | ||
|
||
### 🎯 **Goal** | ||
|
||
This script take a link of any URL and generate a QR code corresponding to it. | ||
|
||
Library Used: | ||
[qrcode](https://github.com/lincolnloop/python-qrcode) | ||
|
||
|
||
### 🧾 **Description** | ||
|
||
The QR Code Generator script creates a QR code based on the input URL. Users can customize the size, error correction level, and color of the QR code. The generated QR code is saved as an image file and can be used for scanning or sharing the URL. | ||
|
||
### 🚀 **Models Implemented** | ||
|
||
- Provide your desired URL in the script | ||
- Execute `python3 generate_qrcode.py` | ||
|
||
|
||
### 📢 **Conclusion** | ||
|
||
`This script efficiently generates a customized QR code for any input URL, allowing for color customization and easy storage as an image.` | ||
|
||
### ✒️ **Your Signature** | ||
|
||
|
||
`Ananya Gupta` | ||
[GitHub Profile](https://github.com/ananyag309) | ||
|
||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import qrcode | ||
|
||
input_URL = "https://www.google.com/" | ||
|
||
qr = qrcode.QRCode( | ||
version=1, | ||
error_correction=qrcode.constants.ERROR_CORRECT_L, | ||
box_size=15, | ||
border=4, | ||
) | ||
|
||
qr.add_data(input_URL) | ||
qr.make(fit=True) | ||
|
||
img = qr.make_image(fill_color="red", back_color="white") | ||
img.save("url_qrcode.png") | ||
|
||
print(qr.data_list) |