Cowrie.Transforms (cowrie v0.4.0)
Defines functions that transform (a.k.a. mutate) text. These functions do not print the text and they do not apply ANSI formatting.
Summary
Functions
Prepends a Danger emoji to the given text.
Prepends an Info emoji to the given text.
Prepends a Success emoji to the given text.
Prepends a Warning emoji to the given text.
Appends a newline to the text.
Draws a box around the given text. The text must be less than one line and it should not contain newlines.
A wrapper for String.capitalize/2
Centers the given text using the configured column width (:cols)
A wrapper for String.downcase/2
Creates a horizontal line
Formats a list item for an ordered list by applying the :n
character.
Prepends a newline to the text.
Formats a list item for an unordered list by applying the :li_bullet
character.
A wrapper for String.upcase/2
Functions
Prepends a Danger emoji to the given text.
Prepends an Info emoji to the given text.
Prepends a Success emoji to the given text.
Prepends a Warning emoji to the given text.
Appends a newline to the text.
Draws a box around the given text. The text must be less than one line and it should not contain newlines.
Available configuration:
:box_chars
- a map with keys containing for the top(t), top-right(tr),
right (right), bottom-right (br), bottom (b), bottom-left (bl), left (l),
and top-left (tl) characters to be used when drawing the box.
Default:
%{
t: "═",
tr: "╗",
r: "║",
br: "╝",
b: "═",
bl: "╚",
l: "║",
tl: "╔"
}
:box_padding
- integer representing the number of columns of empty space between
the box's left and right borders and the text, default: 1
A wrapper for String.capitalize/2
Centers the given text using the configured column width (:cols)
A wrapper for String.downcase/2
Creates a horizontal line
Formats a list item for an ordered list by applying the :n
character.
Prepends a newline to the text.
Formats a list item for an unordered list by applying the :li_bullet
character.
A wrapper for String.upcase/2