Skip to content

cmtt/qrgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qrgen

Renders input from stdin as QR codes on ANSI terminals.

Installation

It is recommended to install Rust stable using Rustup. In order to build and install qrgen, run the following command:

cargo install --path .

Usage

USAGE:
    qrgen [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -s, --small      Outputs a smaller code.
        --svg        Outputs a SVG image
    -V, --version    Prints version information

OPTIONS:
    -m, --margin <margin>    Margin size

Display QR code in terminal

$ echo "foobar" | qrgen


    ██████████████      ██████  ██████████████
    ██          ██  ██████  ██  ██          ██
    ██  ██████  ██      ██████  ██  ██████  ██
    ██  ██████  ██  ████    ██  ██  ██████  ██
    ██  ██████  ██    ██    ██  ██  ██████  ██
    ██          ██  ██    ██    ██          ██
    ██████████████  ██  ██  ██  ██████████████
                      ██
    ██████████  ██████    ██  ██  ██  ██  ██
    ██  ████████      ██  ████████    ██  ██
    ██      ████████        ██  ████
    ████  ██            ██████████    ██  ██
        ██████  ██      ██  ██    ██    ██
                    ██  ██  ██    ██    ██
    ██████████████  ████  ██  ██    ██████████
    ██          ██    ██          ████  ██  ██
    ██  ██████  ██  ████████  ██    ██████████
    ██  ██████  ██  ██████████████    ██
    ██  ██████  ██  ██      ██  ████
    ██          ██  ██    ████████    ██
    ██████████████  ██      ██    ██    ██



Display QR code in terminal (small)

$ echo "foobar" | qrgen --small

  █▀▀▀▀▀█ ▄▄█▀█ █▀▀▀▀▀█
  █ ███ █ ▄▄▀▀█ █ ███ █
  █ ▀▀▀ █ ▄▀ ▄▀ █ ▀▀▀ █
  ▀▀▀▀▀▀▀ ▀▄▀ ▀ ▀▀▀▀▀▀▀
  ▀▀▀▀▀ ▀▀█  █▄█▄█ █ ▀▄
   █▀▀█ ▀▄▀█▄▄█▄██▄█▄▀▄
  ▀ ▀ ▀▀▀▀█▀  █  █▀▄ ▀▄
  █▀▀▀▀▀█ ▀▀█▀ ▀ █▄█▄█▄
  █ ███ █ █▀▀█▄█▄▀▄ ▄▀
  █ ▀▀▀ █ █▀█▄█▄█  ▄▄
  ▀▀▀▀▀▀▀ ▀   ▀  ▀   ▀

Display QR code as image

The following command generates and displays a generated QR code using ImageMagick's display command.

$ echo "foobar" | qrgen --svg | display -antialias -resample 500% -define filter:support=0 -

License

MIT

About

Renders QR codes from stdin to ASCII or SVG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages