File: README.md

package info (click to toggle)
rust-qr2term 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 200 kB
  • sloc: makefile: 2
file content (47 lines) | stat: -rw-r--r-- 1,640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[![Build status on GitLab CI][gitlab-ci-master-badge]][gitlab-ci-link]
[![Newest release on crates.io][crate-version-badge]][crate-link]
[![Documentation][docs-badge]][docs]
[![Number of downloads on crates.io][crate-download-badge]][crate-link]
[![Project license][crate-license-badge]](LICENSE)

[crate-download-badge]: https://img.shields.io/crates/d/qr2term.svg
[crate-license-badge]: https://img.shields.io/crates/l/qr2term.svg
[crate-link]: https://crates.io/crates/qr2term
[crate-version-badge]: https://img.shields.io/crates/v/qr2term.svg
[docs-badge]: https://docs.rs/qr2term/badge.svg
[docs]: https://docs.rs/qr2term
[gitlab-ci-link]: https://gitlab.com/timvisee/qr2term-rs/pipelines
[gitlab-ci-master-badge]: https://gitlab.com/timvisee/qr2term-rs/badges/master/pipeline.svg

# Rust library: qr2term
A stupidly simple QR code renderer, that prints text as QR code to the terminal,
and nothing else.

[`example.rs`](./examples/example.rs):
```rust
fn main() {
    qr2term::print_qr("https://rust-lang.org/");
}
```

![qr2term example screenshot](./res/qr2term-example.png)

This library is based on [`qair`](https://code.willemp.be/willem/qair),
which didn't provide the renderer as a library on it's own.
Credits for the actual renderer go to it's developer.

To read a text from the command line and encode it in QR form, run:

```bash
$ echo HelloWorld | cargo run --example example-read
```

To create WiFi credentials in QR form, run:

```bash
$ echo HelloWorld | cargo run --example example-wifi
```

## License
This project is licensed under the MPL 2.0 license.
Check out the [LICENSE](LICENSE) file for more information.