lfpans;od
This commit is contained in:
parent
c3e1cd0438
commit
dad04f35d6
22
keypadOS.lua
22
keypadOS.lua
|
@ -4,11 +4,11 @@ local require = function(path)
|
|||
if __BUNDLER_FILES[path] then
|
||||
return __BUNDLER_FILES[path]()
|
||||
else
|
||||
__DEFAULT_IMPORT(path)
|
||||
return __DEFAULT_IMPORT(path)
|
||||
end
|
||||
end
|
||||
|
||||
__BUNDLER_FILES["updater.lua"] = function ()
|
||||
rawset(__BUNDLER_FILES, "updater.lua", function ()
|
||||
local utils = require("utils.lua")
|
||||
local LAST_USED = os.time()
|
||||
local function checkForUpdate()
|
||||
|
@ -65,16 +65,16 @@ __BUNDLER_FILES["updater.lua"] = function ()
|
|||
GetBasalt
|
||||
}
|
||||
|
||||
end -- FILE END: updater.lua --
|
||||
end) -- FILE END: updater.lua --
|
||||
|
||||
__BUNDLER_FILES["config.lua"] = function ()
|
||||
rawset(__BUNDLER_FILES, "config.lua", function ()
|
||||
return {
|
||||
correctPin = "42169"
|
||||
}
|
||||
|
||||
end -- FILE END: config.lua --
|
||||
end) -- FILE END: config.lua --
|
||||
|
||||
__BUNDLER_FILES["ui.lua"] = function ()
|
||||
rawset(__BUNDLER_FILES, "ui.lua", function ()
|
||||
local utils = require("utils.lua")
|
||||
local basalt = require("basalt")
|
||||
local config = require("config.lua")
|
||||
|
@ -184,9 +184,9 @@ __BUNDLER_FILES["ui.lua"] = function ()
|
|||
InitUi,
|
||||
}
|
||||
|
||||
end -- FILE END: ui.lua --
|
||||
end) -- FILE END: ui.lua --
|
||||
|
||||
__BUNDLER_FILES["utils.lua"] = function ()
|
||||
rawset(__BUNDLER_FILES, "utils.lua", function ()
|
||||
-- Type coersion for lsp
|
||||
---@generic T
|
||||
---@param object any
|
||||
|
@ -212,9 +212,9 @@ __BUNDLER_FILES["utils.lua"] = function ()
|
|||
Cast,
|
||||
}
|
||||
|
||||
end -- FILE END: utils.lua --
|
||||
end) -- FILE END: utils.lua --
|
||||
|
||||
__BUNDLER_FILES["main.lua"] = function ()
|
||||
rawset(__BUNDLER_FILES, "main.lua", function ()
|
||||
-- keycardOS "bootloader", has no access to basalt
|
||||
-- intended for checking for updates, and automatically updating basalt if it is missing
|
||||
local utils = require("utils.lua")
|
||||
|
@ -232,6 +232,6 @@ __BUNDLER_FILES["main.lua"] = function ()
|
|||
Main
|
||||
}
|
||||
|
||||
end -- FILE END: main.lua --
|
||||
end) -- FILE END: main.lua --
|
||||
|
||||
require("main.lua").Main()
|
||||
|
|
6
x.py
6
x.py
|
@ -12,11 +12,11 @@ FILES= [
|
|||
def read_file(p: str) -> str:
|
||||
buf = "";
|
||||
with open("src/"+p, "r", encoding="utf-8") as f:
|
||||
buf += f"\n__BUNDLER_FILES[\"{p}\"] = function ()\n";
|
||||
buf += f"\nrawset(__BUNDLER_FILES, \"{p}\", function ()\n";
|
||||
for line in f.readlines():
|
||||
if str.strip(line) != "":
|
||||
buf += " " + line;
|
||||
buf += f"\nend -- FILE END: {p} --\n";
|
||||
buf += f"\nend) -- FILE END: {p} --\n";
|
||||
return buf;
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ def main():
|
|||
buf += " if __BUNDLER_FILES[path] then\n";
|
||||
buf += " return __BUNDLER_FILES[path]()\n";
|
||||
buf += " else\n";
|
||||
buf += " __DEFAULT_IMPORT(path)\n";
|
||||
buf += " return __DEFAULT_IMPORT(path)\n";
|
||||
buf += " end\n";
|
||||
buf += "end\n";
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user