MO5QZNU5MCKNZSIAXL3KF5TLGA5NVSFBZU2IA3L5WUCPVAUYC5GQC
LVGODUR4JTC7AT6B5QZK6QV35VW3L6RFSLCNKQSSA2FGTCYROUTQC
LRDM35CEK3OHXOTB7TEFJRL7P6PQWO5ZG3F2BVA7DIDFHBPJQ7KAC
PNBKVYZ4ANUAZNQN6KEWYNDF7552ROZPNAPRJE7Q6O7ZZJMJ3S3QC
2DVVKKVA6PJ7VKYLGPQ22AXUB6ZWFMPWB445PRDZJDNLURUFDNDQC
FS2ITYYHBLFT66YUC3ENPFYI2HOYHOVEPQIN7NQR6KF5MEK4NKZAC
6PPPVJKRJ2GPFYUIGLNHJLOQKZGRZ27JMSBFWJ5GGQAQ7V7CQOHAC
D4FEFHQCSILZFQ5VLWNXAIRZNUMCDNGJSM4UJ6T6FDMMIWYRYILQC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
Run this app from the terminal, [passing its directory to LÖVE](https://love2d.org/wiki/Getting_Started#Running_Games)
with a file path to edit.
To run from the terminal, [pass this directory to LÖVE](https://love2d.org/wiki/Getting_Started#Running_Games),
optionally with a file path to edit.
```
$ path/to/love path/to/broadsheet.love path/to/file
```
initialize_editors = function(font_height, filename, screen_top)
Editors = {}
love.graphics.setFont(love.graphics.newFont(font_height))
-- initialize multiple editor widgets
local emwidth = App.newText(love.graphics.getFont(), 'm'):getWidth()
local editor_width = 40*emwidth
local width_remaining = App.screen.width - Margin_left - Margin_right
local left = Margin_left
repeat
local editor = edit.initialize_state(Margin_top, left, left + math.min(editor_width, width_remaining), font_height, math.floor(font_height*1.3))
table.insert(Editors, editor)
width_remaining = width_remaining - editor_width - Margin_left
left = left + editor_width + Margin_left
until width_remaining < editor_width
-- have them all operate on the file's lines
if filename then
love.window.setTitle('broadsheet.love - ' .. filename)
Editors[1].filename = filename
load_from_disk(Editors[1])
end
Text.redraw_all(Editors[1])
for e=2,#Editors do
local editor = Editors[e]
editor.lines = Editors[1].lines
Text.redraw_all(editor) -- TODO: share fragments between editors
end
Editors[1].screen_top1 = screen_top
resync_editors()
end
{"initialize_editors":110,"Filename":85,"on.draw":105,"Screen_top":87,"Editors":6,"on.text_input":69,"resync_editors":107,"on.resize":98,"fw_parent":109,"on.key_release":15,"fw_app":"broadsheet","Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":95,"on":1,"on.initialize":109,"on.file_drop":108,"on.keychord_press":99}
on.initialize = function(arg)
if #arg == 0 or arg[1] == Filename then
initialize_editors(Font_height, Filename, Screen_top)
else
initialize_editors(Font_height, arg[1], {line=1, pos=1})
end
end
{"initialize_editors":96,"Filename":85,"on.draw":105,"Screen_top":87,"Editors":6,"on.text_input":69,"resync_editors":107,"on.resize":98,"fw_parent":108,"on.key_release":15,"fw_app":"broadsheet","Cursor_editor":16,"on.save_settings":88,"on.mouse_press":63,"Font_height":86,"on.mouse_release":59,"on.load_settings":95,"on":1,"on.initialize":109,"on.file_drop":108,"on.keychord_press":99}