The functions here will print text according to the current print mode in CONFIG_MAP["PRINT_MODE"]:

  • ansi - with ANSI encoded colors or effects

  • adoc - in AsciiDoc notation

  • text - as plain text

  • text-anon - as annotated text

By default, the functions take the current print mode. They can also be requested to use a specific, then forced, print mode.

The printed text will not contain a line feed.

PrintColor

Prints text in color in ansi mode, just text otherwise.

Arguments Return

$1: color

$2: message

$3: forced print mode

none

PrintColor light-green "I am available"

PrintColor yellow "some problem here"

Supported colors are:

  • black

  • red

  • green

  • brown

  • blue

  • purple

  • cyan

  • light-gray

  • dark-gray

  • light-red

  • light-green

  • yellow

  • light-blue

  • light-purple

  • light-cyan

PrintEffect

Prints text with an effect in ansi mode, plain text in text mode, and text with some annotation in adoc and text-anon mode.

Arguments Return

$1: effect

$2: message

$3: forced print mode

none

PrintColor bold "I am available"

PrintColor reverse "Name Description"

Supported effects are:

  • bold - either bold, plain text or as annotation using *

  • italic - either italic, plain text or as annotation _

  • reverse - either reverse, or plain text