Skip to content

samlangborgh/qr-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qr-generator

About

This tool generates QR codes in the terminal. It supports numeric, alphanumeric, and byte encoding modes for all QR versions (1 through 40). QR codes can be generated from a positional argument, a file, or standard input.

Demonstration

Building

git clone https://github.com/samlangborgh/qr-generator.git
cd qr-generator
make

Usage

Positional Arguments

Argument Description
message Message used to create QR code (optional)

Options

Option Description
-L Set error correction level to low (7% of data bytes can be restored)
-M Set error correction level to medium (15% of data bytes can be restored)
-Q Set error correction level to quartile (25% of data bytes can be restored)
-H Set error correction level to high (30% of data bytes can be restored)
-i, --invert Invert the colors of the QR code
-f, --file=FILE Create QR from file (optional)
-v, --verbose Print verbose output
--help Display the help message
  • If no message argument or file is provided, the program reads from standard input.
  • The default error correction level is medium.

Examples

./qr -L "The quick brown fox jumps over the lazy dog."
./qr https://github.com/samlangborgh/qr-generator
./qr --file ~/.ssh/id_rsa.pub
./qr -H < myfile.txt
ls | ./qr

Resources

I relied on the following resources while working on this project. I highly recommend checking them out if you are interested in understanding how QR codes work.

About

QR code generator written in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published