fix(qr): Groovy use qrencode CLI instead of ZXing

This commit is contained in:
russell@unturf.com 2026-01-28 17:03:58 -05:00
parent 50069440b4
commit 23b47bfbf8

View file

@ -1,7 +1,7 @@
#!/usr/bin/env groovy
import com.google.zxing.BarcodeFormat
import com.google.zxing.qrcode.QRCodeWriter
def w = new QRCodeWriter()
def m = w.encode("unsandbox-qr-ok", BarcodeFormat.QR_CODE, 0, 0)
println "QR:unsandbox-qr-ok:ROWS:${m.height}"
// Use qrencode CLI via ProcessBuilder (libqrencode wrapper)
def proc = ["qrencode", "-t", "UTF8", "-m", "0", "unsandbox-qr-ok"].execute()
def output = proc.text
proc.waitFor()
def rows = output.split('\n').findAll { it.trim() }.size()
println "QR:unsandbox-qr-ok:ROWS:${rows}"