errbot.rendering.ansiext module¶
-
class
errbot.rendering.ansiext.
AnsiExtension
(**kwargs)[source]¶ Bases:
markdown.extensions.Extension
(kinda hackish) This is just a private extension to postprocess the html text to ansi text
-
class
errbot.rendering.ansiext.
AnsiPostprocessor
(md=None)[source]¶ Bases:
markdown.postprocessors.Postprocessor
Markdown generates html entities, this reputs them back to their unicode equivalent
-
class
errbot.rendering.ansiext.
AnsiPreprocessor
(md, config)[source]¶ Bases:
markdown.extensions.fenced_code.FencedBlockPreprocessor
-
class
errbot.rendering.ansiext.
CharacterTable
(fg_black, fg_red, fg_green, fg_yellow, fg_blue, fg_magenta, fg_cyan, fg_white, fg_default, bg_black, bg_red, bg_green, bg_yellow, bg_blue, bg_magenta, bg_cyan, bg_white, bg_default, fx_reset, fx_bold, fx_italic, fx_underline, fx_not_italic, fx_not_underline, fx_normal, fixed_width, end_fixed_width, inline_code, end_inline_code)¶ Bases:
tuple
-
bg_black
¶ Alias for field number 9
-
bg_blue
¶ Alias for field number 13
-
bg_cyan
¶ Alias for field number 15
-
bg_default
¶ Alias for field number 17
-
bg_green
¶ Alias for field number 11
-
bg_magenta
¶ Alias for field number 14
-
bg_red
¶ Alias for field number 10
-
bg_white
¶ Alias for field number 16
-
bg_yellow
¶ Alias for field number 12
-
end_fixed_width
¶ Alias for field number 26
-
end_inline_code
¶ Alias for field number 28
-
fg_black
¶ Alias for field number 0
-
fg_blue
¶ Alias for field number 4
-
fg_cyan
¶ Alias for field number 6
-
fg_default
¶ Alias for field number 8
-
fg_green
¶ Alias for field number 2
-
fg_magenta
¶ Alias for field number 5
-
fg_red
¶ Alias for field number 1
-
fg_white
¶ Alias for field number 7
-
fg_yellow
¶ Alias for field number 3
-
fixed_width
¶ Alias for field number 25
-
fx_bold
¶ Alias for field number 19
-
fx_italic
¶ Alias for field number 20
-
fx_normal
¶ Alias for field number 24
-
fx_not_italic
¶ Alias for field number 22
-
fx_not_underline
¶ Alias for field number 23
-
fx_reset
¶ Alias for field number 18
-
fx_underline
¶ Alias for field number 21
-
inline_code
¶ Alias for field number 27
-
-
errbot.rendering.ansiext.
translate
(element, chr_table=CharacterTable(fg_black=<ansi.colour.base.Graphic object>, fg_red=<ansi.colour.base.Graphic object>, fg_green=<ansi.colour.base.Graphic object>, fg_yellow=<ansi.colour.base.Graphic object>, fg_blue=<ansi.colour.base.Graphic object>, fg_magenta=<ansi.colour.base.Graphic object>, fg_cyan=<ansi.colour.base.Graphic object>, fg_white=<ansi.colour.base.Graphic object>, fg_default=<ansi.colour.base.Graphic object>, bg_black=<ansi.colour.base.Graphic object>, bg_red=<ansi.colour.base.Graphic object>, bg_green=<ansi.colour.base.Graphic object>, bg_yellow=<ansi.colour.base.Graphic object>, bg_blue=<ansi.colour.base.Graphic object>, bg_magenta=<ansi.colour.base.Graphic object>, bg_cyan=<ansi.colour.base.Graphic object>, bg_white=<ansi.colour.base.Graphic object>, bg_default=<ansi.colour.base.Graphic object>, fx_reset=<ansi.colour.base.Graphic object>, fx_bold=<ansi.colour.base.Graphic object>, fx_italic=<ansi.colour.base.Graphic object>, fx_underline=<ansi.colour.base.Graphic object>, fx_not_italic=<ansi.colour.base.Graphic object>, fx_not_underline=<ansi.colour.base.Graphic object>, fx_normal=<ansi.colour.base.Graphic object>, fixed_width='', end_fixed_width='', inline_code='', end_inline_code=''), borders=True)[source]¶