1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
from .html import HtmlWriter from .markdown import MarkdownWriter def writer(output_format=None): if output_format is None: output_format = "html" return _writers[output_format]() def formats(): return _writers.keys() _writers = { "html": HtmlWriter, "markdown": MarkdownWriter, }