CCVA7636SZDLUSDVELXB6AGQI5SQCT6BG4YL4XGPHDXJY7EYXKQAC
json = require 'json'
function main(args)
local infile = io.open(args[1])
local manifest_s = infile:read('*a')
infile:close()
local manifest = json.decode(manifest_s)
local core_filenames = {}
for k,v in pairs(manifest) do
if not starts_with(k, 'fw_') then
table.insert(core_filenames, k)
end
end
table.sort(core_filenames)
for _,core in ipairs(core_filenames) do
local filename = ('%04d'):format(manifest[core])..'-'..core
local f = io.open(filename)
if f then
print(f:read('*a'))
print('')
end
end
end
function starts_with(s, prefix)
if #s < #prefix then
return false
end
for i=1,#prefix do
if s:sub(i,i) ~= prefix:sub(i,i) then
return false
end
end
return true
end
main(arg)
on = {
-- for top-level handlers (see https://love2d.org/wiki/Main_Page for love.* variants)
-- supported handlers:
-- on.initialize (see love.load)
-- on.quit
-- on.code_change (runs after executing code received from the driver)
-- on.draw
-- on.update
-- on.resize
-- on.file_drop
-- on.focus
-- on.mouse_press (see love.mousepressed)
-- on.mouse_release (see love.mousereleased)
-- on.keychord_press (see keychord.lua in this repo)
-- on.text_input (see love.textinput)
-- on.key_release (see love.keyreleased)
-- on.load_settings(settings) -- fan out settings table into any other global state
-- settings might be nil if there are no saved settings
-- on.save_settings() -- return a settings table which will be persisted to disk across restart
}
{"fw_parent":0,"on":1}