Module
PuduLangDocgen.Command.Actions
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]
report
fn report(log: &Logger.Logger, problems: &Array[Docgen.Diagnostic]) -> ()
Diagnostics written as events at their severity.
Parameters
log&Logger.Loggerproblems&Array[Docgen.Diagnostic]
Returns
()
say
fn say(log: &Logger.Logger, text: Str) -> ()
A plain message at information level.
Parameters
log&Logger.LoggertextStr
Returns
()
detail
fn detail(log: &Logger.Logger, text: Str) -> ()
A plain message at debug level, shown with --verbose.
Parameters
log&Logger.LoggertextStr
Returns
()
failed
fn failed(log: &Logger.Logger, problems: &Array[Docgen.Diagnostic]) -> Int
Reports failures and answers the failed-work status.
Parameters
log&Logger.Loggerproblems&Array[Docgen.Diagnostic]
Returns
Int
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.Loggerparsed&Arguments.Parsed
Returns
Int
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.Loggerparsed&Arguments.Parsed
Returns
Int
download
fn download(log: &Logger.Logger, parsed: &Arguments.Parsed) -> Int
Saves a cross-reference map named by --xref into a file.
Parameters
log&Logger.Loggerparsed&Arguments.Parsed
Returns
Int
merge
fn merge(log: &Logger.Logger, parsed: &Arguments.Parsed) -> Int
Combines cross-reference maps into the --output file.
Parameters
log&Logger.Loggerparsed&Arguments.Parsed
Returns
Int