a QR code generator for the command line
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Michael Ochmann df1c3a78ba code quality: consolidated helpers to single header 2 years ago
docs changed sizing of svgs 2 years ago
lib initial commit 2 years ago
src code quality: consolidated helpers to single header 2 years ago
.gitignore initial commit 2 years ago
CMakeLists.txt code quality: removed duplicate c++ standard 2 years ago
LICENSE.md initial commit 2 years ago
README.md readme: added basic project information 2 years ago
main.cpp code quality: consolidated helpers to single header 2 years ago

README.md

qr

– a QR code generator for the command line

qr

Usage

This software currently supports outputting to the following formats:

  • svg
  • PNG
  • JPG
  • Bitmap

or directly to the console, as kind of an "ascii art".
after installing via make install, you can read more in the man page by calling man qr.

Options

  -f --format     output file format. can be one of "cli, png, svg, jpg, bmp"
  -h --help       show this help
  -i --input      take data from this argument instead of stdin
  -o --output     output file name without extension
  -s --size       desired output file size in pixels
  -t --type       output QR code type. can be one of "small, medium, large"
  -v --version    shows version info

Examples

bash> qr -i "this is from parameter" -f png -s 512 -o my_qrcode_file

bash> echo "this is from stdin" | qr -t small -f png -s 512 -o my_qrcode_file_with_low_ecc

Installation

You can just pick the newest version from the "Releases" page, or build the software yourself.

Building

You will need:

  • cmake
  • make
  • a modern C++ compiler that supports c++20
# clone the repo
bash ~/> git clone https://git.mike-ochmann.de/MassiveDynamic/qr.git
# move into the repository
bash ~/> cd qr
# create the build directory and move into it
bash ~/qr> mkdir build && cd build
# run `cmake`
bash ~/qr/build> cmake ..
# make and install the software
bash ~/qr/build> make install