-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQrCode.py
More file actions
32 lines (31 loc) · 1 KB
/
QrCode.py
File metadata and controls
32 lines (31 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import qrcode
def GenerateQrCode(text):
Generateqr = qrcode.make(text)
Generateqr.show()
print("Welcome to QrCode Generator")
print("1.Text")
print("2.Links")
print("3.Whatapp")
print("4.Wifi")
print("5.Exit")
while True:
Input=int(input("Enter option number to choose: "))
if Input == 5:
print("Thanks for using")
break
if Input == 1:
text = input("Enter Text you want to convert into Qr: ")
GenerateQrCode(text)
elif Input == 2:
links = input("Enter Link you want to convert into Qr:")
GenerateQrCode(links)
elif Input == 3:
Whatsapp = input("Enter WhatsApp number with country code (e.g., 923001234567): ")
GenerateQrCode(f"https://wa.me/{Whatsapp}")
elif Input == 4:
name = input("Enter WiFi name: ")
Pass = input("Enter WiFi password: ")
wifi_format = f"WIFI:T:WPA;S:{name};P:{Pass};;"
GenerateQrCode(wifi_format)
else:
print("Invalid Option")