QR Code creation

First up this is for MacOS at the moment, if there is any interest in a Windows option leave a comment. I also won’t go into installing Homebrew too much but you will need this, start by opening a terminal window and enter:

# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
view raw Install Brew.sh hosted with ❤ by GitHub

Use this to then install qrencode.

# Install qrencode
brew install qrencode
view raw Install qrencode.sh hosted with ❤ by GitHub

To get started with creating QR codes it’s pretty easy. You just need to call it and then set a output file and what content you would like to include.

This sample creates a QR code for this blog post and opens it’s out in Preview.

# Command to create a QR code for this article and open it in preview
qrencode -o - https://willwp.com/wordpress/qr-code-creation/ | open -f -a preview
view raw qrencode.sh hosted with ❤ by GitHub

This creates a QR code and output it to a PNG file to the desktop. Note the s 10 this creates a large size output and you can adjust it as necessary.

# Size the QR code and output it to a PNG file
qrencode -s 10 -o ~/Desktop/create-a-qrcode-article.png "https://willwp.com/wordpress/qr-code-creation/"
view raw qrencode.sh hosted with ❤ by GitHub

If you got this far it’s worth checking the qrencode manual or it’s github Readme, another quick source is using https://www.systutorials.com/docs/linux/man/1-qrencode/ or typing:

# RTFM
qrencode -h
view raw qrencode.sh hosted with ❤ by GitHub