Terminal and CLI QR code generator for URLs.
Project description
QuickQRForge
Generate URL QR codes as PNG files using either:
- an interactive terminal UI (TUI), or
- a script-friendly command-line interface (CLI).
The CLI is exposed via the
qrgencommand once the package is installed from PyPI; no additional setup is necessary.
Quick Start
pip install QuickQRForge
# after installing you can use either the full name or the short alias
qrgen https://example.com --output qr.png --scale 10
# or simply
qr https://example.com --output qr.png --scale 10
Features
- Interactive TUI mode
- Non-interactive CLI mode for app/script integration
- URL normalization (
https://auto-added when missing) - Input validation and meaningful exit codes
- GitHub Actions CI and basic test coverage
Installation
Install from PyPI (dependencies are handled automatically):
pip install QuickQRForge
After installation a cross‑platform
qrgenexecutable script will be placed on your PATH, allowing you to run the utility directly from the shell.
Optional: install/upgrade to the latest release:
pip install --upgrade QuickQRForge
Usage
TUI Mode
By default the command launches a simple screen-based interface using the
standard library curses module. You can tab between fields and press
Enter when finished – it looks like a little form rather than a sequence of
prompts.
If curses isn't available (for example, on stock Windows installs) the
package gracefully falls back to a line-by-line prompt instead; no additional
dependencies are required, though installing windows-curses will enable
the full screen UI on Windows.
qrgen # or: qrgen --tui
CLI Mode
Positional URL:
qrgen https://example.com
Flag-based URL:
qrgen --url https://example.com --output qr.png --scale 10
Example Usage
Generate qr.png from a URL using defaults:
qrgen https://example.com
Generate a QR code with a custom file name and scale:
qrgen https://openai.com --output openai-qr.png --scale 12
Use the flag-based URL argument (useful in scripts):
qrgen --url https://github.com --output github.png --scale 8
Start in interactive TUI mode:
qrgen --tui
Use in Python Code
The library can be imported directly in Python. The public API originally
lived in the qrgen module, but the package was renamed and the canonical
import path is now quickqrforge. The old module still exists and issues a
DeprecationWarning when imported, so you can update at your leisure.
import quickqrforge as qrf
qrf.generate_qr("https://example.com", "example.png")
You can still use the CLI via subprocess if you prefer:
import subprocess
subprocess.run([
"qrgen", "https://example.com", "--output", "example.png", "--scale", "12"
], check=True)
## CLI Arguments
- `url_pos` (optional positional): URL to encode
- `--url`: URL to encode (alternative to positional)
- `--output`: Output PNG file (default: `qr.png`)
- `--scale`: Positive integer image scale (default: `10`)
- `--tui`: Force interactive mode
## Exit Codes (CLI)
- `0`: success
- `1`: error (invalid input or generation failure)
## Development
Install from source:
```powershell
git clone https://github.com/Hibob555556/QRGenerator.git # repo name remains for now
cd QRGenerator # directory name unchanged after clone
pip install -e .
Run tests:
pytest -q
See:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quickqrforge-1.2.0.tar.gz.
File metadata
- Download URL: quickqrforge-1.2.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffe49b64d7d69b37fd19c8e9a9fc436fe6849d95c95e43b845f16c87da67ba40
|
|
| MD5 |
549679ee0eb1e412af0858de66bef5fb
|
|
| BLAKE2b-256 |
13e44a49499cabb025162bffbe923f95682cbf35ee02f5ecab647efb3b516a4d
|
File details
Details for the file quickqrforge-1.2.0-py3-none-any.whl.
File metadata
- Download URL: quickqrforge-1.2.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab1b1fe32220f0197b19877ebf5d57490a50dd80499feb35550ed434d724ac92
|
|
| MD5 |
a2302b398833516bf130d2f98b6159a8
|
|
| BLAKE2b-256 |
92f08d896655d33278c0f86efdc51208add7c71b2ae471f70cf8246452f86f7c
|