songtianyi / qrterminal

QR Codes in your terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)
}

About

QR Codes in your terminal


Languages

Language:Go 100.0%