From 5bd1219bb5c64137a57915951d0f7baea3a270d8 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Mon, 22 Feb 2021 21:45:08 +0200 Subject: [PATCH] qr.bash: create qrcodes with qrencode --- bash/qr.bash | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bash/qr.bash diff --git a/bash/qr.bash b/bash/qr.bash new file mode 100755 index 0000000..4fc1863 --- /dev/null +++ b/bash/qr.bash @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Arguments: Name & content + +# -l H uses the highest error correction in case 30 % gets damaged (or artistried upon) + +# Outputs QR code to terminal + +# ${@:2} takes all arguments except not the first one +qrencode -l H -t utf8 "${@:2}" +# Stores QR code as $1.png (first argument) +qrencode -l H -o "$1".png "${@:2}" + +# Prints details +echo "Name: $1.png" +echo "Content: ${@:2}"