terminal QR
This commit is contained in:
parent
67e94d51dc
commit
0133979627
4 changed files with 31 additions and 0 deletions
15
scripts/qr_generator.js
Executable file
15
scripts/qr_generator.js
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import qrcode from 'qrcode-terminal';
|
||||
|
||||
const text = process.argv[2];
|
||||
|
||||
if (!text) {
|
||||
console.error('Usage: qr_generator.js <text>');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
qrcode.generate(text, { small: true }, (qr) => {
|
||||
console.log(qr);
|
||||
});
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue