Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shikaan/kewar

Generate QR codes from a string in the terminal
https://github.com/shikaan/kewar

qrcode

Last synced: about 4 hours ago
JSON representation

Generate QR codes from a string in the terminal

Awesome Lists containing this project

README

        

# kewar
(pronounced qr)

Generate QR code from given input string

[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

## Installation

```
cabal install exe:kewar

# or

cabal install lib:kewar
```

## CLI

### Example

```bash
$ kewar --error-correction=H "Hello World"
```

### Usage

```bash
$ kewar [options] [INPUT]
```

kewar is a tool to generate QR codes from any supported string,
utilizing an error correction level to allow data recovery.

For more information on QR codes: https://www.qrcode.com/en/

### Options

```
-v --version print qr version
-h --help print this help
-e[LEVEL] --error-correction[=LEVEL] use error correction LEVEL for encoding. Defaults to Q
```

## Library

```haskell
module Main where

import Kewar (generate, CorrectionLevel(Q))
import MyModule (doStuff)

main = do
let input = "my string"
case generate input Q of
Left e -> print e
Right grid -> doStuff grid
```