Import from eraser.io
The code panel accepts eraser.io diagram code as a one-shot import. Pasted text that smells like eraser gets a Convert hint; converting rewrites it into this language, and drawing proceeds through the normal compiler. Eraser is an import format; Koboyo diagram code is the editing format.
Family detection#
Eraser code carries no header, so the transpiler detects the family from the text:
- keyed field lines and dotted relations mean
erd; - blocks and activations mean
sequence; - cloud icons mean
architecture; - otherwise
flowchart.
The detected header is prepended to the output.
An example#
This eraser flow:
Compute [icon: aws-ec2] > Storage [icon: aws-s3]
Storage > Database [icon: aws-rds]
converts to Koboyo code that renders like this:
Compute [aws/ec2]
Storage [aws/simple-storage-service]
Database [aws/rds]
Compute -> Storage -> Database
Cardinality and connectors#
- ERD relations use eraser's cardinality:
>forN:1,<for1:N,-for1:1,<>forN:M. - Graph and sequence connectors normalize to ours:
>becomes->,<>becomes<->; plain lines (-,--) become arrows with a note. - Table icons are dropped with a diagnostic (entities take only a colour);
styleMode,typeface, andautoNumberlines are commented out.
Idempotent#
Every input line maps to one output line, so diagnostics point at the converted text. Text that already starts with a family header passes through untouched, so converting the same input twice is safe.