Package wifiqr
implements support for generating WiFi QR codes. MIT Licensed.
Generate a QR code image and redirect stdout to create a PNG file.
$ go run cmd/wifiqr/main.go > example.png
This produces:
Alternatively, if stdout is a terminal (and not redirected) you can display the QR code directly.
$ go run ./cmd/wifiqr/main.go
SSID: "Example", password: "thisisanexample"
█████████████████████████████████████
█████████████████████████████████████
████ ▄▄▄▄▄ ██ ▀ ▀▀▄ ▄▀▄█ █ ▄▄▄▄▄ ████
████ █ █ █ ▄▀ █ ▄▀▄▄ ▄▄█ █ █ ████
████ █▄▄▄█ █ █ ▀█▀▄▄▄▀▄ ▀█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█ ▀▄█▄▀ █ ▀ ▀▄█▄▄▄▄▄▄▄████
████ ▀▄ ▄ ▄█▀▄█ ▄▄▀ ██▄███▄ ▄█▀████
████ ▄▄▄█▄▄▄▀▀ ▀▀██▄ ▄██ █▀▀ ▀▄█ ████
████ █▀ █▀▄▄▄ ▄ ▄▀█ ▄▄▀▄ ▄██ ████
████▀███▀▀▄▀▄▀▀▄▄ ▄█▀ ▀ ▄▀▀▄▀▀ ██████
████▀▀ ▀▄▀▄█▀ ████▄ ▄█▄█ ▄█▄▀▀▄▀▀████
████ █ ██▀▄▄▄▀ ▄▀█▀▄▀▄█▀▀▀▀ ▀█▄▀████
████▄██▄▄█▄█▀▄█ ▀▀▀ █▄▄█ ▄▄▄ ▀ ▄▄████
████ ▄▄▄▄▄ █▀█▄▀▄ ▄█ ▄▀▀ █▄█ ▄██████
████ █ █ █ ▄▀██▄ █▄▄ ▄ ▄██▀█████
████ █▄▄▄█ █▄▄█▄▀▀ ▄▀ ▀▄███▀█ ▀ ▀████
████▄▄▄▄▄▄▄█▄▄▄▄▄██▄█▄████▄█▄█▄▄█████
█████████████████████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀