1
0
forked from osmarks/potatOS

improve log viewer

This commit is contained in:
osmarks 2020-08-24 14:17:58 +01:00
parent 3a4cb56914
commit 1e2ed259fc
2 changed files with 12 additions and 4 deletions

View File

@ -1,2 +1,2 @@
{"build":156,"description":"very fix JSON in SPUDNET","files":{"LICENSES":"f3549d84d66eb53dd4a421a4341d77d3d217c1b117d67e3be8f5211adcda0952","autorun.lua":"62c93a60f100f94e4c20325ff22b6fb0eafa225eb5e307045936cdf2d589f3e8","bin/5rot26.lua":"91b66cd6d4b33081b25c456142dd7efcb894e819e842693c9e1e17ff48872ff5","bin/ccemux.lua":"239476f58835b86bbcac31ce8af3c3acd3d198a55ab9ada78c62fbf358625a98","bin/chronometer.lua":"db5363993a04382145aef7db2fbe262f0bf10697a589e1e2d2f9ce0f87430dd8","bin/kristminer.lua":"7e7f9fe2a6493d584ad6926cda915e02c1c3d800dc209680898ce930d0bb0e6f","bin/livegps.lua":"c3d17d495cda01aa1261e4c4fcd43439b29af422671972117ec34f68e32c5bba","bin/loading.lua":"c85f7aa1765170325155b921c1fceeb62643f552f12d41b529a22af3a67f5a97","bin/potatoflight.lua":"2fbb0b6f8d78728d8cb0ec64af1bc598bd00cb55f202378e7acdb86bba71efd1","bin/potatoplex.lua":"86c9e7597bbe23d7de7e7f1bfc976d0b94dcdf3af9e6c7c6c9b18b98596898c8","bin/relay.lua":"261ae6c220b83506e3326e8f2b091d246baae458ff0d2ee87512be2c4e35a75d","bin/tryhaskell.lua":"07810d85145da65a3e434154c79d5a9d72f2dcbe59c8d6829040fb925df878ec","potatobios.lua":"8821428eec9400a6e8155da0f5485163614f72a462212a8bbae0601d3812bfba","signing-key.tbl":"b32af5229c23af3bc03d538e42751b26044e404a7b1af064ed89894efe421607","startup":"f17bfb9b4322c4467dc9170d50827f2d75717e5c3125d734f21f3406657917bc","update-key.hex":"8d8afb7a45833bb7d68f929421ad60a211d4d73e0ee03b24dc0106ba1de2e1a0","xlib/00_cbor.lua":"464b075e4f094b8db42506bd4bdaad0db87699ea7fbf80e5b87739b4aa9279af","xlib/01_skynet.lua":"bde95ed86f3108ec56624367deea3e2694c8cfcd9eac220a21bad0b56c8a999b"},"timestamp":1598274539} {"build":157,"description":"improve log","files":{"LICENSES":"f3549d84d66eb53dd4a421a4341d77d3d217c1b117d67e3be8f5211adcda0952","autorun.lua":"7b335d3eccf65c337fcdf535a47e2710b3fe4ec6090e888bd2bc09c42eebd32d","bin/5rot26.lua":"91b66cd6d4b33081b25c456142dd7efcb894e819e842693c9e1e17ff48872ff5","bin/ccemux.lua":"239476f58835b86bbcac31ce8af3c3acd3d198a55ab9ada78c62fbf358625a98","bin/chronometer.lua":"db5363993a04382145aef7db2fbe262f0bf10697a589e1e2d2f9ce0f87430dd8","bin/kristminer.lua":"7e7f9fe2a6493d584ad6926cda915e02c1c3d800dc209680898ce930d0bb0e6f","bin/livegps.lua":"c3d17d495cda01aa1261e4c4fcd43439b29af422671972117ec34f68e32c5bba","bin/loading.lua":"c85f7aa1765170325155b921c1fceeb62643f552f12d41b529a22af3a67f5a97","bin/potatoflight.lua":"2fbb0b6f8d78728d8cb0ec64af1bc598bd00cb55f202378e7acdb86bba71efd1","bin/potatoplex.lua":"86c9e7597bbe23d7de7e7f1bfc976d0b94dcdf3af9e6c7c6c9b18b98596898c8","bin/relay.lua":"261ae6c220b83506e3326e8f2b091d246baae458ff0d2ee87512be2c4e35a75d","bin/tryhaskell.lua":"07810d85145da65a3e434154c79d5a9d72f2dcbe59c8d6829040fb925df878ec","potatobios.lua":"8821428eec9400a6e8155da0f5485163614f72a462212a8bbae0601d3812bfba","signing-key.tbl":"b32af5229c23af3bc03d538e42751b26044e404a7b1af064ed89894efe421607","startup":"f17bfb9b4322c4467dc9170d50827f2d75717e5c3125d734f21f3406657917bc","update-key.hex":"8d8afb7a45833bb7d68f929421ad60a211d4d73e0ee03b24dc0106ba1de2e1a0","xlib/00_cbor.lua":"464b075e4f094b8db42506bd4bdaad0db87699ea7fbf80e5b87739b4aa9279af","xlib/01_skynet.lua":"bde95ed86f3108ec56624367deea3e2694c8cfcd9eac220a21bad0b56c8a999b"},"timestamp":1598274890}
{"hash":"73f1ac78ace6e43373b53aa6a5dcd183ef65646ceaa77c369db899661b296434","sig":"b1f99e1c0848ec247a6e92a85e384ea4bee03470191820a375a5acaad21cd17c561d6bb3bb54d1947e24"} {"hash":"daa3b2f10031e3e7086cd51744d5cd0c1b47c339d80aa118308d223acf519355","sig":"39a4329954fe3df0faf27b3fea0b62f209149a8b08f22ad24b76e40386312c70b983dfb9be75022afb1a"}

View File

@ -1245,13 +1245,21 @@ end
) )
]], ]],
["/rom/programs/log.lua"] = [[ ["/rom/programs/log.lua"] = [[
local old_mode = ... == "old" local args = table.concat({...}, " ")
local logtext local logtext
if old_mode then if args:match "old" then
logtext = potatOS.read "old.log" logtext = potatOS.read "old.log"
else else
logtext = potatOS.get_log() logtext = potatOS.get_log()
end end
if args:match "tail" then
local lines = logtext / "\n"
local out = {}
for i = (#lines - 20), #lines do
if lines[i] then table.insert(out, lines[i]) end
end
logtext = table.concat(out, "\n")
end
textutils.pagedPrint(logtext) textutils.pagedPrint(logtext)
]], ]],
["/rom/programs/init-screens.lua"] = [[potatOS.init_screens(); print "Done!"]], ["/rom/programs/init-screens.lua"] = [[potatOS.init_screens(); print "Done!"]],