Skip to content

Scan a QR code in the terminal using a given PNG image.

License

Notifications You must be signed in to change notification settings

redraiment/qrscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qrscan

Continuous Integration Continuous Deployment

Scan a QR code in the terminal using a given (PNG or JPEG) image.

qrscan.mp4

Install

Pre-built binaries (Recommends)

Download the appropriate binary from the latest release.

Build on Debian/Ubuntu Linux

This requires pkg-config, libpng, and libjpeg.

sudo apt install --no-install-recommends -y pkg-config libpng-dev libjpeg-dev
git clone --recurse-submodules https://github.com/redraiment/qrscan.git
cd qrscan
make
sudo make install

Build on MacOS

This requires pkg-config, libpng, and libjpeg.

brew install pkg-config libpng libjpeg
git clone --recurse-submodules https://github.com/redraiment/qrscan.git
cd qrscan
make
sudo make install

Usage

qrscan [OPTIONS] [PNG|JPG|-]

Image Options

  • --png, --jpg: the format of the input file, inferred from the extension by default.
  • -c, --count: suppress normal output, instead print a count of QR-Code.
  • -n NUM, --index NUM: Output the NUM QR-Code value only.

Other Options

  • -v, --version: show the version and exit.
  • -h, --help: show help message and exit.

Examples

  1. Read from image file:
qrscan image.png
  1. Read from stdin:
cat image.jpg | qrscan --jpg -
  1. Count QR-Code in image:
qrscan -c image.png
  1. Read the second QR-Code in image:
qrscan -2 image.png
# Or
qrscan -n 2 image.png

License

qrscan is open-source software, released under the MIT License.

Feel free to explore, learn, and extend to suit your needs.

About

Scan a QR code in the terminal using a given PNG image.

Resources

License

Stars

Watchers

Forks

Packages

No packages published