qrmaster 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qrmaster-1.0.0/LICENSE +20 -0
- qrmaster-1.0.0/PKG-INFO +119 -0
- qrmaster-1.0.0/README.md +97 -0
- qrmaster-1.0.0/pyproject.toml +34 -0
- qrmaster-1.0.0/qrmaster/__init__.py +17 -0
- qrmaster-1.0.0/qrmaster/cli.py +54 -0
- qrmaster-1.0.0/qrmaster/generator.py +71 -0
- qrmaster-1.0.0/qrmaster.egg-info/PKG-INFO +119 -0
- qrmaster-1.0.0/qrmaster.egg-info/SOURCES.txt +12 -0
- qrmaster-1.0.0/qrmaster.egg-info/dependency_links.txt +1 -0
- qrmaster-1.0.0/qrmaster.egg-info/entry_points.txt +2 -0
- qrmaster-1.0.0/qrmaster.egg-info/requires.txt +2 -0
- qrmaster-1.0.0/qrmaster.egg-info/top_level.txt +1 -0
- qrmaster-1.0.0/setup.cfg +4 -0
qrmaster-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 QR Master (https://www.qrmaster.net)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
qrmaster-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qrmaster
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Fast Python QR Code generator & CLI powered by QR Master
|
|
5
|
+
Author-email: QR Master Team <support@qrmaster.net>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://www.qrmaster.net
|
|
8
|
+
Project-URL: WiFi QR Generator, https://www.qrmaster.net/tools/wifi-qr-code
|
|
9
|
+
Project-URL: vCard QR Generator, https://www.qrmaster.net/tools/vcard-qr-code
|
|
10
|
+
Project-URL: WhatsApp QR Generator, https://www.qrmaster.net/tools/whatsapp-qr-code
|
|
11
|
+
Project-URL: Source Code, https://github.com/knuthtimo-lab/qrmaster-cli
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
15
|
+
Classifier: Topic :: Utilities
|
|
16
|
+
Requires-Python: >=3.7
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: qrcode>=7.4.2
|
|
20
|
+
Requires-Dist: pillow>=9.0.0
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# 📱 QR Master Python Package & CLI
|
|
24
|
+
|
|
25
|
+
> **Fast, zero-setup Python QR Code Generator and Terminal CLI.**
|
|
26
|
+
> Powered by [QR Master](https://www.qrmaster.net) – The Smart QR Code & Analytics Platform.
|
|
27
|
+
|
|
28
|
+
[](https://pypi.org/project/qrmaster/)
|
|
29
|
+
[](https://pypi.org/project/qrmaster/)
|
|
30
|
+
[](LICENSE)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## ✨ Features
|
|
35
|
+
|
|
36
|
+
- ⚡ **Zero Configuration CLI**: Generate terminal ASCII QR codes in seconds using `qrmaster "https://www.qrmaster.net"`.
|
|
37
|
+
- 🖼️ **PNG & Vector SVG Export**: Save crisp PNG raster files or scalable SVG vector files directly to disk.
|
|
38
|
+
- 📡 **WiFi & vCard Generators**: Built-in helper functions for instant WiFi connections and vCard contact cards.
|
|
39
|
+
- 🔗 **Powered by [QR Master](https://www.qrmaster.net)**: Need dynamic QR codes with live tracking, custom logo branding, and high-volume vector PDF export? Visit QR Master.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🚀 Installation
|
|
44
|
+
|
|
45
|
+
Install via `pip`:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install qrmaster
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 💻 CLI Usage
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Print QR code directly in terminal
|
|
57
|
+
qrmaster "https://www.qrmaster.net"
|
|
58
|
+
|
|
59
|
+
# Save as PNG image
|
|
60
|
+
qrmaster "https://www.qrmaster.net" -o qrmaster.png
|
|
61
|
+
|
|
62
|
+
# Save as SVG vector file
|
|
63
|
+
qrmaster "https://www.qrmaster.net" -o qrmaster.svg
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 📶 WiFi QR Code
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
qrmaster --wifi --ssid "MyHomeWiFi" --password "<wifi-password>" -o wifi.png
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 👤 vCard Contact QR Code
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
qrmaster --vcard --name "Alex Smith" --email "alex@example.com" --phone "+123456789"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 🐍 Python SDK API Usage
|
|
81
|
+
|
|
82
|
+
Use `qrmaster` directly inside your Python applications:
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from qrmaster import generate_qr, build_wifi_payload, build_vcard_payload
|
|
86
|
+
|
|
87
|
+
# Generate terminal QR
|
|
88
|
+
generate_qr("https://www.qrmaster.net")
|
|
89
|
+
|
|
90
|
+
# Save PNG image file
|
|
91
|
+
generate_qr("https://www.qrmaster.net", output="qrmaster.png")
|
|
92
|
+
|
|
93
|
+
# Generate WiFi payload & save vector SVG
|
|
94
|
+
wifi_data = build_wifi_payload(ssid="Office-5G", password="<wifi-password>")
|
|
95
|
+
generate_qr(wifi_data, output="wifi.svg")
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🌐 Need Dynamic QR Codes & Analytics?
|
|
101
|
+
|
|
102
|
+
Static QR codes are great for local terminal use, but if you need:
|
|
103
|
+
- 📊 **Real-time Scan Analytics & Location Tracking**
|
|
104
|
+
- 🎨 **Custom Brand Colors, Logos & Styled Frames**
|
|
105
|
+
- 🔄 **Dynamic Target URLs (Change destination without re-printing)**
|
|
106
|
+
- 🏢 **Bulk Vector PDF Export for Commercial Printing**
|
|
107
|
+
|
|
108
|
+
Visit [QR Master - Free Smart QR Code Generator](https://www.qrmaster.net).
|
|
109
|
+
|
|
110
|
+
### 🛠️ Free Micro Tools by QR Master
|
|
111
|
+
- [WiFi QR Code Generator](https://www.qrmaster.net/tools/wifi-qr-code)
|
|
112
|
+
- [VCard QR Code Generator](https://www.qrmaster.net/tools/vcard-qr-code)
|
|
113
|
+
- [WhatsApp QR Code Generator](https://www.qrmaster.net/tools/whatsapp-qr-code)
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 📄 License
|
|
118
|
+
|
|
119
|
+
MIT © [QR Master](https://www.qrmaster.net)
|
qrmaster-1.0.0/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# 📱 QR Master Python Package & CLI
|
|
2
|
+
|
|
3
|
+
> **Fast, zero-setup Python QR Code Generator and Terminal CLI.**
|
|
4
|
+
> Powered by [QR Master](https://www.qrmaster.net) – The Smart QR Code & Analytics Platform.
|
|
5
|
+
|
|
6
|
+
[](https://pypi.org/project/qrmaster/)
|
|
7
|
+
[](https://pypi.org/project/qrmaster/)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ✨ Features
|
|
13
|
+
|
|
14
|
+
- ⚡ **Zero Configuration CLI**: Generate terminal ASCII QR codes in seconds using `qrmaster "https://www.qrmaster.net"`.
|
|
15
|
+
- 🖼️ **PNG & Vector SVG Export**: Save crisp PNG raster files or scalable SVG vector files directly to disk.
|
|
16
|
+
- 📡 **WiFi & vCard Generators**: Built-in helper functions for instant WiFi connections and vCard contact cards.
|
|
17
|
+
- 🔗 **Powered by [QR Master](https://www.qrmaster.net)**: Need dynamic QR codes with live tracking, custom logo branding, and high-volume vector PDF export? Visit QR Master.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🚀 Installation
|
|
22
|
+
|
|
23
|
+
Install via `pip`:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install qrmaster
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 💻 CLI Usage
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Print QR code directly in terminal
|
|
35
|
+
qrmaster "https://www.qrmaster.net"
|
|
36
|
+
|
|
37
|
+
# Save as PNG image
|
|
38
|
+
qrmaster "https://www.qrmaster.net" -o qrmaster.png
|
|
39
|
+
|
|
40
|
+
# Save as SVG vector file
|
|
41
|
+
qrmaster "https://www.qrmaster.net" -o qrmaster.svg
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 📶 WiFi QR Code
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
qrmaster --wifi --ssid "MyHomeWiFi" --password "<wifi-password>" -o wifi.png
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 👤 vCard Contact QR Code
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
qrmaster --vcard --name "Alex Smith" --email "alex@example.com" --phone "+123456789"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 🐍 Python SDK API Usage
|
|
59
|
+
|
|
60
|
+
Use `qrmaster` directly inside your Python applications:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from qrmaster import generate_qr, build_wifi_payload, build_vcard_payload
|
|
64
|
+
|
|
65
|
+
# Generate terminal QR
|
|
66
|
+
generate_qr("https://www.qrmaster.net")
|
|
67
|
+
|
|
68
|
+
# Save PNG image file
|
|
69
|
+
generate_qr("https://www.qrmaster.net", output="qrmaster.png")
|
|
70
|
+
|
|
71
|
+
# Generate WiFi payload & save vector SVG
|
|
72
|
+
wifi_data = build_wifi_payload(ssid="Office-5G", password="<wifi-password>")
|
|
73
|
+
generate_qr(wifi_data, output="wifi.svg")
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 🌐 Need Dynamic QR Codes & Analytics?
|
|
79
|
+
|
|
80
|
+
Static QR codes are great for local terminal use, but if you need:
|
|
81
|
+
- 📊 **Real-time Scan Analytics & Location Tracking**
|
|
82
|
+
- 🎨 **Custom Brand Colors, Logos & Styled Frames**
|
|
83
|
+
- 🔄 **Dynamic Target URLs (Change destination without re-printing)**
|
|
84
|
+
- 🏢 **Bulk Vector PDF Export for Commercial Printing**
|
|
85
|
+
|
|
86
|
+
Visit [QR Master - Free Smart QR Code Generator](https://www.qrmaster.net).
|
|
87
|
+
|
|
88
|
+
### 🛠️ Free Micro Tools by QR Master
|
|
89
|
+
- [WiFi QR Code Generator](https://www.qrmaster.net/tools/wifi-qr-code)
|
|
90
|
+
- [VCard QR Code Generator](https://www.qrmaster.net/tools/vcard-qr-code)
|
|
91
|
+
- [WhatsApp QR Code Generator](https://www.qrmaster.net/tools/whatsapp-qr-code)
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 📄 License
|
|
96
|
+
|
|
97
|
+
MIT © [QR Master](https://www.qrmaster.net)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "qrmaster"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Fast Python QR Code generator & CLI powered by QR Master"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [
|
|
11
|
+
{ name = "QR Master Team", email = "support@qrmaster.net" }
|
|
12
|
+
]
|
|
13
|
+
license = "MIT"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
"Topic :: Multimedia :: Graphics",
|
|
18
|
+
"Topic :: Utilities"
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"qrcode>=7.4.2",
|
|
22
|
+
"pillow>=9.0.0"
|
|
23
|
+
]
|
|
24
|
+
requires-python = ">=3.7"
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
"Homepage" = "https://www.qrmaster.net"
|
|
28
|
+
"WiFi QR Generator" = "https://www.qrmaster.net/tools/wifi-qr-code"
|
|
29
|
+
"vCard QR Generator" = "https://www.qrmaster.net/tools/vcard-qr-code"
|
|
30
|
+
"WhatsApp QR Generator" = "https://www.qrmaster.net/tools/whatsapp-qr-code"
|
|
31
|
+
"Source Code" = "https://github.com/knuthtimo-lab/qrmaster-cli"
|
|
32
|
+
|
|
33
|
+
[project.scripts]
|
|
34
|
+
qrmaster = "qrmaster.cli:main"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from .generator import (
|
|
2
|
+
generate_qr,
|
|
3
|
+
build_wifi_payload,
|
|
4
|
+
build_vcard_payload,
|
|
5
|
+
build_whatsapp_payload,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
__version__ = "1.0.0"
|
|
9
|
+
__author__ = "QR Master Team"
|
|
10
|
+
__homepage__ = "https://www.qrmaster.net"
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"generate_qr",
|
|
14
|
+
"build_wifi_payload",
|
|
15
|
+
"build_vcard_payload",
|
|
16
|
+
"build_whatsapp_payload",
|
|
17
|
+
]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import sys
|
|
3
|
+
from .generator import (
|
|
4
|
+
generate_qr,
|
|
5
|
+
build_wifi_payload,
|
|
6
|
+
build_vcard_payload,
|
|
7
|
+
build_whatsapp_payload,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
def main():
|
|
11
|
+
parser = argparse.ArgumentParser(
|
|
12
|
+
description="📱 QR Master CLI - Terminal QR Code Generator (Powered by QR Master)"
|
|
13
|
+
)
|
|
14
|
+
parser.add_argument("data", nargs="?", help="URL or text content to encode into QR code")
|
|
15
|
+
parser.add_argument("-o", "--output", help="Output file path (e.g. qrcode.png or qr.svg)")
|
|
16
|
+
parser.add_argument("--wifi", action="store_true", help="Generate WiFi connection QR Code")
|
|
17
|
+
parser.add_argument("--ssid", help="WiFi SSID (used with --wifi)")
|
|
18
|
+
parser.add_argument("--password", help="WiFi Password (used with --wifi)")
|
|
19
|
+
parser.add_argument("--vcard", action="store_true", help="Generate vCard contact QR Code")
|
|
20
|
+
parser.add_argument("--name", help="Contact Name (used with --vcard)")
|
|
21
|
+
parser.add_argument("--email", help="Contact Email (used with --vcard)")
|
|
22
|
+
parser.add_argument("--phone", help="Contact Phone Number (used with --vcard)")
|
|
23
|
+
parser.add_argument("--whatsapp", action="store_true", help="Generate WhatsApp chat QR Code")
|
|
24
|
+
|
|
25
|
+
args = parser.parse_args()
|
|
26
|
+
|
|
27
|
+
payload = args.data
|
|
28
|
+
|
|
29
|
+
if args.wifi:
|
|
30
|
+
if not args.ssid:
|
|
31
|
+
print("Error: --ssid is required when generating a WiFi QR code.", file=sys.stderr)
|
|
32
|
+
sys.exit(1)
|
|
33
|
+
payload = build_wifi_payload(ssid=args.ssid, password=args.password or "")
|
|
34
|
+
|
|
35
|
+
elif args.vcard:
|
|
36
|
+
payload = build_vcard_payload(name=args.name or "", email=args.email or "", phone=args.phone or "")
|
|
37
|
+
|
|
38
|
+
elif args.whatsapp:
|
|
39
|
+
phone_num = args.phone or args.data
|
|
40
|
+
if not phone_num:
|
|
41
|
+
print("Error: Phone number is required for WhatsApp QR code.", file=sys.stderr)
|
|
42
|
+
sys.exit(1)
|
|
43
|
+
payload = build_whatsapp_payload(phone=phone_num)
|
|
44
|
+
|
|
45
|
+
if not payload:
|
|
46
|
+
parser.print_help()
|
|
47
|
+
print("\nVisit https://www.qrmaster.net for dynamic QR codes & scan analytics.")
|
|
48
|
+
sys.exit(1)
|
|
49
|
+
|
|
50
|
+
generate_qr(payload, output=args.output, terminal=True)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
if __name__ == "__main__":
|
|
54
|
+
main()
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
import qrcode
|
|
4
|
+
from qrcode.image.svg import SvgPathImage
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def build_wifi_payload(ssid: str, password: str = "", encryption: str = "WPA", hidden: bool = False) -> str:
|
|
8
|
+
if not ssid:
|
|
9
|
+
raise ValueError("SSID is required for WiFi QR Code")
|
|
10
|
+
return f"WIFI:S:{ssid};T:{encryption};P:{password};H:{'true' if hidden else 'false'};;"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def build_vcard_payload(name: str = "", email: str = "", phone: str = "", org: str = "", title: str = "", url: str = "") -> str:
|
|
14
|
+
lines = ["BEGIN:VCARD", "VERSION:3.0"]
|
|
15
|
+
if name:
|
|
16
|
+
lines.extend([f"N:{name};;;;", f"FN:{name}"])
|
|
17
|
+
if org:
|
|
18
|
+
lines.append(f"ORG:{org}")
|
|
19
|
+
if title:
|
|
20
|
+
lines.append(f"TITLE:{title}")
|
|
21
|
+
if phone:
|
|
22
|
+
lines.append(f"TEL;TYPE=CELL:{phone}")
|
|
23
|
+
if email:
|
|
24
|
+
lines.append(f"EMAIL:{email}")
|
|
25
|
+
if url:
|
|
26
|
+
lines.append(f"URL:{url}")
|
|
27
|
+
lines.append("END:VCARD")
|
|
28
|
+
return "\n".join(lines)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def build_whatsapp_payload(phone: str, text: str = "") -> str:
|
|
32
|
+
clean_phone = "".join(filter(str.isdigit, phone))
|
|
33
|
+
url = f"https://wa.me/{clean_phone}"
|
|
34
|
+
if text:
|
|
35
|
+
from urllib.parse import quote
|
|
36
|
+
url += f"?text={quote(text)}"
|
|
37
|
+
return url
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def print_terminal_qr(data: str):
|
|
41
|
+
print("\n--- QR Code generated by QR Master (https://www.qrmaster.net) ---\n")
|
|
42
|
+
qr = qrcode.QRCode(border=1)
|
|
43
|
+
qr.add_data(data)
|
|
44
|
+
qr.make(fit=True)
|
|
45
|
+
qr.print_ascii(invert=True)
|
|
46
|
+
print(f"\nPayload: {data}")
|
|
47
|
+
print("Need dynamic QR codes, custom branding & scan analytics? Visit: https://www.qrmaster.net\n")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def generate_qr(data: str, output: str = None, terminal: bool = True):
|
|
51
|
+
if terminal or not output:
|
|
52
|
+
print_terminal_qr(data)
|
|
53
|
+
|
|
54
|
+
if output:
|
|
55
|
+
ext = os.path.splitext(output)[1].lower()
|
|
56
|
+
abs_path = os.path.abspath(output)
|
|
57
|
+
|
|
58
|
+
if ext == ".svg":
|
|
59
|
+
qr = qrcode.QRCode(image_factory=SvgPathImage)
|
|
60
|
+
qr.add_data(data)
|
|
61
|
+
qr.make(fit=True)
|
|
62
|
+
img = qr.make_image()
|
|
63
|
+
img.save(abs_path)
|
|
64
|
+
print(f"[QR Master] SVG saved successfully to {abs_path}")
|
|
65
|
+
else:
|
|
66
|
+
qr = qrcode.QRCode(border=1)
|
|
67
|
+
qr.add_data(data)
|
|
68
|
+
qr.make(fit=True)
|
|
69
|
+
img = qr.make_image(fill_color="black", back_color="white")
|
|
70
|
+
img.save(abs_path)
|
|
71
|
+
print(f"[QR Master] PNG saved successfully to {abs_path}")
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qrmaster
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Fast Python QR Code generator & CLI powered by QR Master
|
|
5
|
+
Author-email: QR Master Team <support@qrmaster.net>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://www.qrmaster.net
|
|
8
|
+
Project-URL: WiFi QR Generator, https://www.qrmaster.net/tools/wifi-qr-code
|
|
9
|
+
Project-URL: vCard QR Generator, https://www.qrmaster.net/tools/vcard-qr-code
|
|
10
|
+
Project-URL: WhatsApp QR Generator, https://www.qrmaster.net/tools/whatsapp-qr-code
|
|
11
|
+
Project-URL: Source Code, https://github.com/knuthtimo-lab/qrmaster-cli
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
15
|
+
Classifier: Topic :: Utilities
|
|
16
|
+
Requires-Python: >=3.7
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: qrcode>=7.4.2
|
|
20
|
+
Requires-Dist: pillow>=9.0.0
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# 📱 QR Master Python Package & CLI
|
|
24
|
+
|
|
25
|
+
> **Fast, zero-setup Python QR Code Generator and Terminal CLI.**
|
|
26
|
+
> Powered by [QR Master](https://www.qrmaster.net) – The Smart QR Code & Analytics Platform.
|
|
27
|
+
|
|
28
|
+
[](https://pypi.org/project/qrmaster/)
|
|
29
|
+
[](https://pypi.org/project/qrmaster/)
|
|
30
|
+
[](LICENSE)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## ✨ Features
|
|
35
|
+
|
|
36
|
+
- ⚡ **Zero Configuration CLI**: Generate terminal ASCII QR codes in seconds using `qrmaster "https://www.qrmaster.net"`.
|
|
37
|
+
- 🖼️ **PNG & Vector SVG Export**: Save crisp PNG raster files or scalable SVG vector files directly to disk.
|
|
38
|
+
- 📡 **WiFi & vCard Generators**: Built-in helper functions for instant WiFi connections and vCard contact cards.
|
|
39
|
+
- 🔗 **Powered by [QR Master](https://www.qrmaster.net)**: Need dynamic QR codes with live tracking, custom logo branding, and high-volume vector PDF export? Visit QR Master.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🚀 Installation
|
|
44
|
+
|
|
45
|
+
Install via `pip`:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install qrmaster
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 💻 CLI Usage
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Print QR code directly in terminal
|
|
57
|
+
qrmaster "https://www.qrmaster.net"
|
|
58
|
+
|
|
59
|
+
# Save as PNG image
|
|
60
|
+
qrmaster "https://www.qrmaster.net" -o qrmaster.png
|
|
61
|
+
|
|
62
|
+
# Save as SVG vector file
|
|
63
|
+
qrmaster "https://www.qrmaster.net" -o qrmaster.svg
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 📶 WiFi QR Code
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
qrmaster --wifi --ssid "MyHomeWiFi" --password "<wifi-password>" -o wifi.png
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 👤 vCard Contact QR Code
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
qrmaster --vcard --name "Alex Smith" --email "alex@example.com" --phone "+123456789"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 🐍 Python SDK API Usage
|
|
81
|
+
|
|
82
|
+
Use `qrmaster` directly inside your Python applications:
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from qrmaster import generate_qr, build_wifi_payload, build_vcard_payload
|
|
86
|
+
|
|
87
|
+
# Generate terminal QR
|
|
88
|
+
generate_qr("https://www.qrmaster.net")
|
|
89
|
+
|
|
90
|
+
# Save PNG image file
|
|
91
|
+
generate_qr("https://www.qrmaster.net", output="qrmaster.png")
|
|
92
|
+
|
|
93
|
+
# Generate WiFi payload & save vector SVG
|
|
94
|
+
wifi_data = build_wifi_payload(ssid="Office-5G", password="<wifi-password>")
|
|
95
|
+
generate_qr(wifi_data, output="wifi.svg")
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🌐 Need Dynamic QR Codes & Analytics?
|
|
101
|
+
|
|
102
|
+
Static QR codes are great for local terminal use, but if you need:
|
|
103
|
+
- 📊 **Real-time Scan Analytics & Location Tracking**
|
|
104
|
+
- 🎨 **Custom Brand Colors, Logos & Styled Frames**
|
|
105
|
+
- 🔄 **Dynamic Target URLs (Change destination without re-printing)**
|
|
106
|
+
- 🏢 **Bulk Vector PDF Export for Commercial Printing**
|
|
107
|
+
|
|
108
|
+
Visit [QR Master - Free Smart QR Code Generator](https://www.qrmaster.net).
|
|
109
|
+
|
|
110
|
+
### 🛠️ Free Micro Tools by QR Master
|
|
111
|
+
- [WiFi QR Code Generator](https://www.qrmaster.net/tools/wifi-qr-code)
|
|
112
|
+
- [VCard QR Code Generator](https://www.qrmaster.net/tools/vcard-qr-code)
|
|
113
|
+
- [WhatsApp QR Code Generator](https://www.qrmaster.net/tools/whatsapp-qr-code)
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 📄 License
|
|
118
|
+
|
|
119
|
+
MIT © [QR Master](https://www.qrmaster.net)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
qrmaster/__init__.py
|
|
5
|
+
qrmaster/cli.py
|
|
6
|
+
qrmaster/generator.py
|
|
7
|
+
qrmaster.egg-info/PKG-INFO
|
|
8
|
+
qrmaster.egg-info/SOURCES.txt
|
|
9
|
+
qrmaster.egg-info/dependency_links.txt
|
|
10
|
+
qrmaster.egg-info/entry_points.txt
|
|
11
|
+
qrmaster.egg-info/requires.txt
|
|
12
|
+
qrmaster.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
qrmaster
|
qrmaster-1.0.0/setup.cfg
ADDED