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)" |
Use this to then install qrencode.
# Install qrencode | |
brew install qrencode |
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 |
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/" |
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 |