Documentation
¶
Overview ¶
Package report turns a run into a file to share: the printed markdown, a standalone HTML page or a PDF. The CLI's --pdf and --html and the GUI's Report dialog both use it, so they make the same reports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Formats = []Format{PDF, HTML, Markdown}
Formats lists every format, in the order a menu shows them.
Functions ¶
Types ¶
type Format ¶
type Format string
Format is a kind of report.
const ( // Markdown is what mdsh prints: placeholders as values, mdsh:if // sections decided, and no #! line. It is what mdsh -n -o saves. Markdown Format = "markdown" // HTML is a standalone page, with local images inside it. HTML Format = "html" // PDF is what mdsh --pdf writes. PDF Format = "pdf" )
type Options ¶
type Options struct {
Format Format
// HideCode leaves out runnable blocks, as --hide-code does.
HideCode bool
// HideOutput leaves out output, as --hide-output does.
HideOutput bool
// Env is the caller's environment, for {{$VAR}} placeholders and
// conditions; see render.Options.
Env []string
// Dir is where relative image links are read from, for HTML and
// PDF. Empty means the working directory.
Dir string
// Title is the report's title. Empty means none for a PDF and
// "mdsh report" for an HTML page.
Title string
}
Options control what a report shows.