qr code lib

This commit is contained in:
BuckarooBanzay 2023-01-28 17:49:12 +01:00
parent 54866b1f47
commit 1162262b9c
5 changed files with 1341 additions and 2 deletions

View file

@ -15,3 +15,7 @@ read_globals = {
-- testing
"mtt"
}
files["qrencode.lua"] = {
ignore = {"631"}
}

View file

@ -5,11 +5,15 @@ otp = {
storage = minetest.get_mod_storage(),
-- baseXX functions
basexx = loadfile(MP.."/basexx.lua")()
basexx = loadfile(MP.."/basexx.lua")(),
-- qr code
qrcode = loadfile(MP.."/qrencode.lua")().qrcode
}
dofile(MP.."/functions.lua")
if minetest.get_modpath("mtt") and mtt.enabled then
dofile(MP.."/functions.spec.lua")
dofile(MP.."/qrencode.spec.lua")
end

1325
qrencode.lua Normal file

File diff suppressed because it is too large Load diff

5
qrencode.spec.lua Normal file
View file

@ -0,0 +1,5 @@
mtt.register("otp.qrcode", function(callback)
assert(type(otp.qrcode) == "function")
callback()
end)

View file

@ -7,4 +7,5 @@
# License
* Code: `MIT`
* "basexx.lua" `MIT` https://github.com/aiq/basexx/blob/master/lib/basexx.lua
* "basexx.lua" `MIT` https://github.com/aiq/basexx/blob/master/lib/basexx.lua
* "qrencode.lua" `BSD` https://github.com/speedata/luaqrcode/blob/master/qrencode.lua