A command-line QR code generator and reader tool written in Go. This tool allows you to generate QR codes, read QR codes from images, and display QR codes directly in your terminal.
Features
- Generate QR code images from text/URL content
- Read QR codes from image files (supports PNG, JPEG)
- Display QR codes directly in terminal
- Command-line interface with multiple options
Installation
# Clone the repository
git clone https://github.com/walle-soft/qr-tools.git
# Navigate to the directory
cd qr-tools
# Build the project
go build
Usage
Generate QR Code Image
./qrcode -g -c "content" [-f filename.png]
Display Existing QR Code Image
./qrcode -d -f image.png
Directly Display QR Code in Terminal
./qrcode -d -c "content"
Command Options
-g
: Generate QR code image
-d
: Display QR code
-c
: Content for QR code
-f
: File path for input/output image
Examples
- Generate a QR code image:
./qrcode -g -c "https://example.com" -f test.png
- Read and display a QR code from an image:
./qrcode -d -f test.png
- Display content as QR code in terminal:
./qrcode -d -c "Hello, World!"
Dependencies
License
This project is licensed under the Apache License 2.0 - see the
LICENSE
file for details.