mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2024-11-29 06:39:22 +01:00
{qr,wifiqr}.bash: make make PIXELSIZE a variable
This commit is contained in:
parent
f81a0ca221
commit
3f2886733a
@ -3,14 +3,15 @@
|
||||
# Arguments: Name & content
|
||||
|
||||
# -l H uses the highest error correction in case 30 % gets damaged (or artistried upon)
|
||||
# -s 6 doubles the dot/pixel size
|
||||
# -s $PIXELSIZE doubles the dot/pixel size from 3
|
||||
PIXELSIZE=6
|
||||
|
||||
# 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 -s 6 -l H -o "$1".png "${@:2}"
|
||||
qrencode -s $PIXELSIZE -l H -o "$1".png "${@:2}"
|
||||
# My stepfather wants jpg
|
||||
convert "$1".png "$1".jpg
|
||||
# Prints details
|
||||
|
@ -4,10 +4,12 @@
|
||||
|
||||
# -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:WPA;S:$1;P:$2;;"
|
||||
# Stores QR code as SSID.png, -s doubles pixel size from default 3
|
||||
qrencode -l H -s 6 -o $1.png "WIFI:T:WPA;S:$1;P:$2;;"
|
||||
qrencode -l H -s $PIXELSIZE -o $1.png "WIFI:T:WPA;S:$1;P:$2;;"
|
||||
# Might as well jpg this too
|
||||
convert "$1".png "$1".jpg
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user