Macaw.Frame.TextForms.Gantt (macaw_frame v0.1.0)

Copy Markdown View Source

The gantt text form (spec/02 §11.3, spec/13 §7.3): a Gantt chart written as mermaid writes one, read into a design whose gantt step lays its tasks against a time grid (Macaw.Frame.TextForms).

gantt
  title Release
  dateFormat YYYY-MM-DD
  section Plan
    Design :done, a1, 2026-01-05, 4d
    Review :a2, after a1, 2d
  section Build
    Build :crit, b1, after a2, 2026-01-20
    Ship :milestone, m1, after b1, 0d
  • title names the design (meta.name); dateFormat is YYYY-MM-DD, the one format read; section Name starts a section.
  • A task is Label : items, its items separated by commas: first its states (done, active, crit, milestone), then its id, its start and its end, of which the end is required. A start is a date or after id…; an end a date or a duration (3d, 2w, 4h, 30m, 10s). With one item it is the end, the start the previous task's end; with two the start (or the id, when the first is no start) and the end.

Rows: tasks (id, label, section, from and to as Dates, duration, after, state its states a space between each), in order. Faults, every one at once: {:expected, :task}, {:expected, :end}, {:date, text}, {:date_format, text}, {:unsupported, word}. print/1 writes the title, the sections and the tasks.