Generate a basic qr code quickly with its link using the terminal (ZSH Shell)
- Install
zbar
using Homebrew: https://formulae.brew.sh/formula/zbar (this does the decoding of the qr code to get the wrapped link)
- Clone repo
- Give executable permissions if not already:
chmod u+x qr.sh
- Open .zshrc using your text editor (example here using VI):
vi ~/.zshrc
to set your zsh shell settings - Add this line in .zshrc:
export PATH=/path/to/your/file:$PATH
(/path/to/your/file
should be the path where yourqr.sh
is located) - Run this command from the command line:
source ~/.zshrc
- You should be able to use
qr.sh
anywhere from the command line now
Note: You can also create a symlink to the shell script and use that as a command too
Follow the script instructions and enter the required fields. The only field that is required is your Branch App Key
The script will store the QR Code image in the file you included in the script prompts or if not included, it will save it in this format: qr-code-<random id>.png
within the same directory
The script will also print out the underlying link of the QR Code