View Source Clik.Output.Document (Clik v0.2.2)

Formatted terminal output.

Link to this section Summary

Functions

Creates a new empty document

Add a line to a document

Adds a section header to a document

Add table to document

Adds a block of text to a document

Link to this section Types

@type code() :: IO.ANSI.ansicode() | nil
@type doc_entries() :: [] | [Clik.Renderable.t()]
@type t() :: %Clik.Output.Document{entries: doc_entries()}

Link to this section Functions

@spec empty() :: t()

Creates a new empty document

Link to this function

line(doc, code \\ nil, text)

View Source (since 0.1.0)
@spec line(t(), code(), String.t()) :: t()

Add a line to a document

Link to this function

section_head(doc, code \\ nil, text)

View Source (since 0.1.0)
@spec section_head(t(), code(), String.t()) :: t()

Adds a section header to a document

Link to this function

table(doc, table)

View Source (since 0.1.0)
@spec table(t(), Clik.Output.Table.t()) :: t()

Add table to document

Link to this function

text(doc, code \\ nil, text)

View Source (since 0.1.0)
@spec text(t(), code(), String.t()) :: t()

Adds a block of text to a document