paint
Run a chunk of Lua at the easel (notes/easel_guide.md). The reply is what the chunk printed, then `ok`. A chunk that stops with an error changes nothing.
| parameter | type | what it is |
|---|---|---|
lua * | string | the chunk |
look
Look at the canvas as it is now. Without options: the whole canvas, scaled down. crop: "x0,y0,x1,y1" in canvas units (two opposite corners), shown at 1:1 pixels. mode: "value", "squint", "mirror" or several, comma-separated. size: the long side in pixels. grid: true, or a spacing in canvas units.
| parameter | type | what it is |
|---|---|---|
crop | string | |
mode | string | |
size | number | |
grid |
note
Add an entry to your journal, notes/journal.md, stamped with the painting's time. To revise what is already there, give the exact passage to change as `replaces`: `text` takes its place.
| parameter | type | what it is |
|---|---|---|
text * | string | |
replaces | string |
status
The canvas's setup.
log
The painting so far: every chunk that ran, in order (paintings/lua/painting.lua).
read
Read the contents of a file. Supports text files and images (jpg, png, gif, webp, bmp). Images are sent as attachments. For text files, output is truncated to 2000 lines or 50KB (whichever is hit first). Use offset/limit for large files. When you need the full file, continue with offset until complete.
| parameter | type | what it is |
|---|---|---|
path * | string | Path to the file to read (relative or absolute) |
offset | number | Line number to start reading from (1-indexed) |
limit | number | Maximum number of lines to read |
* required