• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# QRCode Terminal Edition [![Build Status][travis-ci-img]][travis-ci-url]
2
3> Going where no QRCode has gone before.
4
5![Basic Example][basic-example-img]
6
7# Node Library
8
9## Install
10
11Can be installed with:
12
13    $ npm install qrcode-terminal
14
15and used:
16
17    var qrcode = require('qrcode-terminal');
18
19## Usage
20
21To display some data to the terminal just call:
22
23    qrcode.generate('This will be a QRCode, eh!');
24
25You can even specify the error level (default is 'L'):
26
27    qrcode.setErrorLevel('Q');
28    qrcode.generate('This will be a QRCode with error level Q!');
29
30If you don't want to display to the terminal but just want to string you can provide a callback:
31
32    qrcode.generate('http://github.com', function (qrcode) {
33        console.log(qrcode);
34    });
35
36If you want to display small output, provide `opts` with `small`:
37
38    qrcode.generate('This will be a small QRCode, eh!', {small: true});
39
40    qrcode.generate('This will be a small QRCode, eh!', {small: true}, function (qrcode) {
41        console.log(qrcode)
42    });
43
44# Command-Line
45
46## Install
47
48    $ npm install -g qrcode-terminal
49
50## Usage
51
52    $ qrcode-terminal --help
53    $ qrcode-terminal 'http://github.com'
54    $ echo 'http://github.com' | qrcode-terminal
55
56# Support
57
58- OS X
59- Linux
60- Windows
61
62# Server-side
63
64[node-qrcode][node-qrcode-url] is a popular server-side QRCode generator that
65renders to a `canvas` object.
66
67# Developing
68
69To setup the development envrionment run `npm install`
70
71To run tests run `npm test`
72
73# Contributers
74
75    Gord Tanner <gtanner@gmail.com>
76    Micheal Brooks <michael@michaelbrooks.ca>
77
78[travis-ci-img]: https://travis-ci.org/gtanner/qrcode-terminal.png
79[travis-ci-url]: https://travis-ci.org/gtanner/qrcode-terminal
80[basic-example-img]: https://raw.github.com/gtanner/qrcode-terminal/master/example/basic.png
81[node-qrcode-url]: https://github.com/soldair/node-qrcode
82
83