include the tool that's mentioned in representation.md

[?]
Feb 3, 2023, 4:50 PM
57HKHZ7Z4QSCS6X35H5WZ5Y4MALGLYAPMUTP25BTU2MYTO6HOLXAC

Dependencies

Change contents

  • file addition: tools (d--r------)
    [2.2]
  • file addition: stitch-live.lua (----------)
    [0.2]
    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)