https://github.com/cmtt/qrgen
Renders QR codes from stdin to ASCII or SVG
https://github.com/cmtt/qrgen
Last synced: 8 months ago
JSON representation
Renders QR codes from stdin to ASCII or SVG
- Host: GitHub
- URL: https://github.com/cmtt/qrgen
- Owner: cmtt
- Created: 2020-04-29T19:05:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-30T06:29:56.000Z (about 6 years ago)
- Last Synced: 2025-03-29T05:41:41.565Z (about 1 year ago)
- Language: Rust
- Size: 2.93 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# qrgen
Renders input from stdin as QR codes on ANSI terminals.
## Installation
It is recommended to install Rust stable using [Rustup](https://rustup.rs/). In order to build and install `qrgen`, run the following command:
````bash
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 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](ImageMagick)'s `display` command.
````
$ echo "foobar" | qrgen --svg | display -antialias -resample 500% -define filter:support=0 -
````
# License
MIT