Module

PuduLangDocgen.Command.Actions

View source

Reporting and the commands that create and exchange files

Functions

Name Description
logger A logger for a command line: messages at or above `--logLevel` (information unless set, debug with `--verbose`) on the console with warnings and errors on standard error, and every event as compact JSON in the `--log` file when one is named.
report Diagnostics written as events at their severity.
say A plain message at information level.
detail A plain message at debug level, shown with `--verbose`.
failed Reports failures and answers the failed-work status.
initialize Creates a project, asking for a title and API sources unless `--yes` accepts defaults.
template Lists built-in templates or exports one, or every one with `--all`, into a folder.
download Saves a cross-reference map named by `--xref` into a file.
merge Combines cross-reference maps into the `--output` file.

logger

fn logger(parsed: &Arguments.Parsed) -> Result[Logger.Logger, Str]

A logger for a command line: messages at or above --logLevel (information unless set, debug with --verbose) on the console with warnings and errors on standard error, and every event as compact JSON in the --log file when one is named.

Parameters

parsed
&Arguments.Parsed

Returns

Result[Logger.Logger, Str]

View source

report

fn report(log: &Logger.Logger, problems: &Array[Docgen.Diagnostic]) -> ()

Diagnostics written as events at their severity.

Parameters

log
&Logger.Logger
problems
&Array[Docgen.Diagnostic]

Returns

()

View source

say

fn say(log: &Logger.Logger, text: Str) -> ()

A plain message at information level.

Parameters

log
&Logger.Logger
text
Str

Returns

()

View source

detail

fn detail(log: &Logger.Logger, text: Str) -> ()

A plain message at debug level, shown with --verbose.

Parameters

log
&Logger.Logger
text
Str

Returns

()

View source

failed

fn failed(log: &Logger.Logger, problems: &Array[Docgen.Diagnostic]) -> Int

Reports failures and answers the failed-work status.

Parameters

log
&Logger.Logger
problems
&Array[Docgen.Diagnostic]

Returns

Int

View source

initialize

fn initialize(log: &Logger.Logger, parsed: &Arguments.Parsed) -> Int

Creates a project, asking for a title and API sources unless --yes accepts defaults.

Parameters

log
&Logger.Logger
parsed
&Arguments.Parsed

Returns

Int

View source

template

fn template(log: &Logger.Logger, parsed: &Arguments.Parsed) -> Int

Lists built-in templates or exports one, or every one with --all, into a folder.

Parameters

log
&Logger.Logger
parsed
&Arguments.Parsed

Returns

Int

View source

download

fn download(log: &Logger.Logger, parsed: &Arguments.Parsed) -> Int

Saves a cross-reference map named by --xref into a file.

Parameters

log
&Logger.Logger
parsed
&Arguments.Parsed

Returns

Int

View source

merge

fn merge(log: &Logger.Logger, parsed: &Arguments.Parsed) -> Int

Combines cross-reference maps into the --output file.

Parameters

log
&Logger.Logger
parsed
&Arguments.Parsed

Returns

Int

View source