qrencode for lua
C Lua
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
ChangeLog
LICENSE
Makefile
README.md
qrencode-1.0.2-1.rockspec
qrencode.c

README.md

qrencode: qrencode is a wrapper of libqrencode with libpng for lua.

qrencode is a wrapper of libqrencode with libpng for lua.

Install

qrencode is dependent on libqrencode and libpng, so make sure these are installed before compile it.

Example usage

qr = require "qrencode"

-- print PNG data stream to stdout.

print(qr.encode("is ok?"))
print(qr:encode("is ok?"))
print(qr("is ok?"))

-- print ansi char
print(qr {text = "is ok?", ansi = true})

-- or pass a table :

print(qr {
    text="is ok?",
    level="L",
    kanji=false,
    ansi=true,
    size=4,
    margin=2,
    symversion=0,
    dpi=78,
    casesensitive=false,
    foreground="48AF6D",
    background="3FAF6F"
}
)

when pass a table, "text" is required and other is optional.

Author

vinoca http://www.vinoca.org/

Copyright and license

Code and documentation copyright 2014-2015 vinoca. Code released under the MIT license. Docs released under Creative commons.