prelöoad experiment

This commit is contained in:
seb
2026-07-20 00:39:16 +02:00
parent c5b2f06919
commit 724f873bfe
10 changed files with 5596 additions and 59 deletions

20
scripts/qr-cert.mjs Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env node
/** Print a terminal QR for stdin (or argv[2]) — raw payload only. */
import qrcode from 'qrcode';
const fromArg = process.argv[2];
const payload = fromArg
? fromArg
: (await new Response(process.stdin).text()).trim();
if (!payload) {
console.error('usage: qr-cert.mjs <base64-der> or pipe payload on stdin');
process.exit(1);
}
const out = await qrcode.toString(payload, {
type: 'terminal',
errorCorrectionLevel: 'L',
small: true,
});
process.stdout.write(out);