Documentation
¶
Overview ¶
Package tasktree draws every task tree f10 prints: a row per task on box-drawing lines down each After: chain, and under a row its title and labelled notes. Skills relay this output verbatim instead of drawing the glyphs themselves, so a tree reads the same wherever it is shown.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cell ¶
A Cell is one column of a row. Text is what is measured and padded; Render, when set, is what prints in its place (color, a link), so escape sequences never count as columns.
type Node ¶
A Node is one task. Depth 0 is the top level; a node one deeper than the node before it hangs under that node.
type Note ¶
A Note is a labelled line under a row: an ask, a halt, a gate. Whole keeps it uncut, for text a reader acts on (a url, a question).
type Tree ¶
type Tree struct {
// Head prints first, alone, and the top-level nodes hang under it.
Head string
// Indent goes before every line but Head.
Indent string
// Hang draws glyphs on the top-level nodes too, as if under a Head.
Hang bool
// Align pads each column to its widest cell; otherwise the cells of a
// row are joined by two spaces, empty ones skipped.
Align bool
// Width cuts titles and notes to fit it; 0 is no limit.
Width int
// Label renders a note's label; nil prints it as is.
Label func(string) string
}
A Tree is how the nodes print.