Utilities¶
Note
The documentation in this section is aimed at people wishing to contribute
to histofile
, and can be skipped if you are simply using the tool from
the command line.
-
ANSI_FG_COLOURS = {…}
Terminal escapes for colours.
Foreground colour control codes
-
ANSI_BG_COLOURS = {…}
Terminal escapes for colours.
Background colour control codes
-
stylise
(text, colour=nil, attrib={bold: false, underline: false}, force=false)¶ Generate stylised output for the terminal.
Parameters: - text – Text to format
- colour – Colour to use
- attrib – Formatting attributes to apply
Returns: Stylised output
-
success
(text, bold=true)¶ Standardised success message.
Parameters: - text – Text to stylise
- bold – Use bold output
-
fail
(text, bold=true)¶ Standardised failure message.
Parameters: - text – Text to stylise
- bold – Use bold output
-
warn
(text, bold=true)¶ Standardised warning message.
Parameters: - text – Text to stylise
- bold – Use bold output