QR code reader for OS X via Terminal
Hello, there! I want to share with you how you can extend the functionality of your Mac OS X. To do this, you will need the Homebrew package manager to install a couple of small utilities.
Run this in the Terminal to install the utilities from Homebrew:
brew install zbar pngpaste
Special thanks to @innitdoe from Reddit for the alias tip:
alias qrpaste='zbarimg -q --raw <(pngpaste -)'
And for convenience you can encapsulate it in a separate script:
#! /bin/bashFILENAME="$TMPDIR$RANDOM.png" # Generates a file name
pngpaste "$FILENAME" # Paste screenshot into file
zbarimg -q --raw "$FILENAME" # Will try to decode QR-code
rm -rf "$FILENAME" # Removing file for security
Remember to make the script executable using command: chmod + x
Highlight the QR code on screen using “Shift + Control + Command + 4” and just run the script!
I also shared the script on my Dropbox:
Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email…
Note: for correct results, scan non-stylized QR codes