up
This commit is contained in:
commit
842c6a100e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.png
|
16
Qrcode.py
Normal file
16
Qrcode.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import pyqrcode
|
||||||
|
import os
|
||||||
|
|
||||||
|
path = os.getcwd()
|
||||||
|
url = input("URL : ")
|
||||||
|
try:
|
||||||
|
taille = int(input("Taille (1-100 par defaut=5) : ").strip() or "5")
|
||||||
|
if taille < 1 or taille > 100:
|
||||||
|
print("Valeur incorrecte !")
|
||||||
|
else:
|
||||||
|
qr = pyqrcode.create(url)
|
||||||
|
qr.png(path + "/qr.png", scale=taille)
|
||||||
|
print("Sauvegardé dans " + path + "/qr.png")
|
||||||
|
|
||||||
|
except ValueError:
|
||||||
|
print("Valeur numérique uniquement !")
|
Loading…
x
Reference in New Issue
Block a user