keypadOS/x.py
2024-08-18 02:08:11 +03:00

32 lines
590 B
Python
Executable File

#!/usr/bin/python
OUTPUT="keypadOS.lua";
FILES= [
"src/boot.lua",
"src/init.lua",
"src/config.lua",
"src/unlock_door.lua",
"src/utils.lua",
"src/main.lua",
]
def read_file(p: str) -> str:
buf = "";
with open(p, "r", encoding="utf-8") as f:
buf = f"\n-- FILE: {p}\n\n" + f.read();
return buf;
def main():
buf = "";
for file in FILES:
print(f"=== FILE: {file}");
buf += read_file(file);
with open(OUTPUT, "w", encoding="utf-8") as f:
f.write(buf);
print("DONE");
if __name__ == "__main__":
main();