NapCatQQ/packages/napcat-qrcode
手瓜一十雪 09da80aad5
Some checks are pending
Build NapCat Artifacts / Build-Framework (push) Waiting to run
Build NapCat Artifacts / Build-Shell (push) Waiting to run
Remove unused dependencies from package.json
Deleted the 'dependencies' section from napcat-qrcode/package.json, removing references to napcat-core, napcat-common, napcat-onebot, and napcat-webui-backend. This streamlines the package configuration and may indicate these dependencies are no longer required.
2025-11-16 11:02:21 +08:00
..
lib refactor: 整体重构 (#1381) 2025-11-13 15:39:42 +08:00
vendor/QRCode refactor: 整体重构 (#1381) 2025-11-13 15:39:42 +08:00
package.json Remove unused dependencies from package.json 2025-11-16 11:02:21 +08:00
README.md refactor: 整体重构 (#1381) 2025-11-13 15:39:42 +08:00
tsconfig.json Refactor TypeScript configs to use shared base 2025-11-15 14:00:27 +08:00

QRCode Terminal Edition Build Status

Going where no QRCode has gone before.

Basic Example

Node Library

Install

Can be installed with:

$ npm install qrcode-terminal

and used:

var qrcode = require('qrcode-terminal');

Usage

To display some data to the terminal just call:

qrcode.generate('This will be a QRCode, eh!');

You can even specify the error level (default is 'L'):

qrcode.setErrorLevel('Q');
qrcode.generate('This will be a QRCode with error level Q!');

If you don't want to display to the terminal but just want to string you can provide a callback:

qrcode.generate('http://github.com', function (qrcode) {
    console.log(qrcode);
});

If you want to display small output, provide opts with small:

qrcode.generate('This will be a small QRCode, eh!', {small: true});

qrcode.generate('This will be a small QRCode, eh!', {small: true}, function (qrcode) {
    console.log(qrcode)
});

Command-Line

Install

$ npm install -g qrcode-terminal

Usage

$ qrcode-terminal --help
$ qrcode-terminal 'http://github.com'
$ echo 'http://github.com' | qrcode-terminal

Support

  • OS X
  • Linux
  • Windows

Server-side

node-qrcode is a popular server-side QRCode generator that renders to a canvas object.

Developing

To setup the development envrionment run npm install

To run tests run npm test

Contributers

Gord Tanner <gtanner@gmail.com>
Micheal Brooks <michael@michaelbrooks.ca>