errbot.rendering package

Module contents

class errbot.rendering.Mde2mdConverter[source]

Bases: object

convert(mde)[source]
errbot.rendering.ansi()[source]

This makes a converter from markdown to ansi (console) format. It can be called like this: from errbot.rendering import ansi md_converter = ansi() # you need to cache the converter

ansi_txt = md_converter.convert(md_txt)

errbot.rendering.imtext()[source]

This makes a converter from markdown to imtext (unicode) format. imtest is the format like gtalk, slack or skype with simple _ or * markup.

It can be called like this: from errbot.rendering import imtext md_converter = imtext() # you need to cache the converter

im_text = md_converter.convert(md_txt)

errbot.rendering.md()[source]

This makes a converter from markdown-extra to markdown, stripping the attributes from extra.

errbot.rendering.md_escape(txt)[source]

Call this if you want to be sure your text won't be interpreted as markdown :param txt: bare text to escape.

errbot.rendering.text()[source]

This makes a converter from markdown to text (unicode) format. It can be called like this: from errbot.rendering import text md_converter = text() # you need to cache the converter

pure_text = md_converter.convert(md_txt)

errbot.rendering.xhtml()[source]

This makes a converter from markdown to xhtml format. It can be called like this: from errbot.rendering import xhtml md_converter = xhtml() # you need to cache the converter

html = md_converter.convert(md_txt)