qrcode

package module
v0.0.0-...-5760778 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2018 License: MIT Imports: 2 Imported by: 0

README

QRCode Terminal

GitHub license

This is a command-line tool to generate QRCode in terminal. And supports multiple colors.

Install

$ go get github.com/dawndiy/qrcode-terminal

Usage

$ qrcode-terminal --help
$ qrcode-terminal 'https://github.com/dawndiy/qrcode-terminal'
$ qrcode-terminal -b white -f magenta 'I Love You'

License

Released under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QRCode

func QRCode(content string, fcolor, bcolor Color, level qrcode.RecoveryLevel)

QRCode generates a QR code and prints it on the command line.

Types

type Color

type Color string

Color is the color string in terminal.

const (
	NormalBlack   Color = "\033[38;5;0m  \033[0m"
	NormalRed     Color = "\033[38;5;1m  \033[0m"
	NormalGreen   Color = "\033[38;5;2m  \033[0m"
	NormalYellow  Color = "\033[38;5;3m  \033[0m"
	NormalBlue    Color = "\033[38;5;4m  \033[0m"
	NormalMagenta Color = "\033[38;5;5m  \033[0m"
	NormalCyan    Color = "\033[38;5;6m  \033[0m"
	NormalWhite   Color = "\033[38;5;7m  \033[0m"

	BrightBlack   Color = "\033[48;5;0m  \033[0m"
	BrightRed     Color = "\033[48;5;1m  \033[0m"
	BrightGreen   Color = "\033[48;5;2m  \033[0m"
	BrightYellow  Color = "\033[48;5;3m  \033[0m"
	BrightBlue    Color = "\033[48;5;4m  \033[0m"
	BrightMagenta Color = "\033[48;5;5m  \033[0m"
	BrightCyan    Color = "\033[48;5;6m  \033[0m"
	BrightWhite   Color = "\033[48;5;7m  \033[0m"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL