add experimental/untested wifiqr-open.bash

This commit is contained in:
Aminda Suomalainen 2023-10-08 19:49:21 +03:00
parent bdcd386dbb
commit 662503876b
Signed by: Mikaela
SSH Key Fingerprint: SHA256:y2OpGEbett3Fqn8XFrP0X4mWfCVKf4rWkxERzqPY81U
1 changed files with 18 additions and 0 deletions

18
bash/wifiqr-open.bash Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Argument: SSID
# -l H uses the highest error correction in case 30 % gets damaged (or artistried upon)
PIXELSIZE=6
# Outputs QR code to terminal
qrencode -l H -t utf8 "WIFI:T:nopass;S:$1;;"
# Stores QR code as SSID.png, -s doubles pixel size from default 3
qrencode -l H -s $PIXELSIZE -o $1.png "WIFI:T:nopass;S:$1;;"
# Might as well jpg this too
convert "$1".png "$1".jpg
# Prints details
echo "SSID: $1"
echo "Stored as $1.png"