const fs = require("fs") let boxes = [] let mode, name, x, y, w, h function flush() { if (mode === 'rect') { boxes[name] = [ x |0, y |0, w |0, h |0 ] } x = y = w = h = 0 name = null } for (let line of fs.readFileSync("tools/layout.svg", "utf-8").split("\n")) { line = line.trim() if (line.startsWith("