11 releases

0.1.10 Aug 15, 2024
0.1.9 Nov 15, 2023
0.1.8 Jan 2, 2022
0.1.7 Jul 6, 2021
0.1.0 Jul 27, 2020

#1112 in Command line utilities

Download history 1/week @ 2024-08-03 94/week @ 2024-08-10 24/week @ 2024-08-17 71/week @ 2024-08-24 131/week @ 2024-08-31 74/week @ 2024-09-07 52/week @ 2024-09-14 101/week @ 2024-09-21 129/week @ 2024-09-28 34/week @ 2024-10-05 91/week @ 2024-10-12 34/week @ 2024-10-19 59/week @ 2024-10-26 51/week @ 2024-11-02 55/week @ 2024-11-09 26/week @ 2024-11-16

205 downloads per month

MIT license

30KB
552 lines

QRrs

CLI QR code generator and reader written in rust

CI License: MIT codecov Version info

image

Info

QRrs is a simple, cross-platform, command-line utility written in rust for working with qr codes (what actually follows from the name).

Usage

Quickly generate qr code

qrrs "Your input here"

Generate code, than read it

qrrs "Something" /tmp/qr.png
$ qrrs --read /tmp/qr.png
Something

Print generated code to term

qrrs -t "Something" /tmp/qr.png

█████████████████████████████
█████████████████████████████
████ ▄▄▄▄▄ █▄ █▄▄█ ▄▄▄▄▄ ████
████ █   █ █▀▄████ █   █ ████
████ █▄▄▄█ █ ▄█▀▄█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█ ▀ ▀ █▄▄▄▄▄▄▄████
████▄███ █▄▄ ▄▀ ▀▄▄▄  █▀▄████
████▄ ▀█▀▄▄▀▄▀▀▄█▀▄█ █▄ ▀████
████▄█▄██▄▄▄▀▀▀█ ▄▀█ ▀█▄ ████
████ ▄▄▄▄▄ █▄▀▄▀ ▄▄▀ ██ █████
████ █   █ █▄█▀ ▀▄▄█ ▀▀ ▀████
████ █▄▄▄█ ██▀ ▄█▀ ▀ ████████
████▄▄▄▄▄▄▄█▄▄▄█▄▄▄▄█▄██▄████
█████████████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

Show code as text in terminal

qrrs --read --terminal /tmp/qr.png

█████████████████████████████
█████████████████████████████
████ ▄▄▄▄▄ █▄ █▄▄█ ▄▄▄▄▄ ████
████ █   █ █▀▄████ █   █ ████
████ █▄▄▄█ █ ▄█▀▄█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█ ▀ ▀ █▄▄▄▄▄▄▄████
████▄███ █▄▄ ▄▀ ▀▄▄▄  █▀▄████
████▄ ▀█▀▄▄▀▄▀▀▄█▀▄█ █▄ ▀████
████▄█▄██▄▄▄▀▀▀█ ▄▀█ ▀█▄ ████
████ ▄▄▄▄▄ █▄▀▄▀ ▄▄▀ ██ █████
████ █   █ █▄█▀ ▀▄▄█ ▀▀ ▀████
████ █▄▄▄█ ██▀ ▄█▀ ▀ ████████
████▄▄▄▄▄▄▄█▄▄▄█▄▄▄▄█▄██▄████
█████████████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

Save it into another file

qrrs --read --terminal /tmp/qr.png /tmp/qr1.png

Almost the same result will be without terminal flag, but now instead of QrCode printed in terminal we will see text from it.

qrrs --read /tmp/qr.png /tmp/qr1.png

Create code using pipeline

Use "-" to signalize passing data via stdin.

$ echo "something" | qrrs - /tmp/something.png
$ qrrs -r /tmp/something.png
something

Invert colors

image

Create code specifying it's margin

image image

Install

Nix

nix run github:Lenivaya/qrrs -- "your input"

Using last version through overlay in nixos config

Add this repository as an input to your flake:

nixpkgs.url = "nixpkgs/nixpkgs-unstable";
qrrs = {
  url = "github:lenivaya/qrrs";
  inputs.nixpkgs.follows = "nixpkgs";
};

Then use the overlay somewhere in your config:

{inputs, pkgs, ...}: {
  nixpkgs.overlays = [inputs.qrrs.overlays.default];
  environment.systemPackages = with pkgs; [qrrs];
}

NetBSD

pkgin install qrrs

From crates.io

cargo install qrrs

From github

cargo install --git https://github.com/Lenivaya/qrrs.git

Precompiled binaries

Dependencies

~14–23MB
~321K SLoC