/qrterminal

QR Codes in your terminal

Primary LanguageGo

QRCode Terminal

Build Status

Pretty simple, I stole this from the NodeJS version at https://github.com/gtanner/qrcode-terminal and turned it into a Golang library.

Install

go get github.com/mdp/qrterminal

Usage

import (
    "github.com/mdp/qrterminal"
    "os"
    )

func main() {
  qrterminal.Generate("https://github.com/mdp/qrterminal", os.Stdout)
}

More complicated

Inverted barcode with medium redundancy

import (
    "github.com/mdp/qrterminal"
    "os"
    )

func main() {
  config := qrterminal.Config{
      Level: qrterminal.L,
      Writer: os.Stdout,
      BlackChar: qrterminal.WHITE,
      WhiteChar: qrterminal.BLACK,
  }
  qrterminal.GenerateWithConfig("https://github.com/mdp/qrterminal", config)
}