diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-07 18:55:24 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-07 18:55:24 +0000 |
| commit | 57eddaefd1961884cddbaf427459822ad8811aeb (patch) | |
| tree | 1693604dfbd460f861227915b9734a4b9ebeb3eb /mammoth/writers/__init__.py | |
| parent | e0b022e52d720758023bb0248ea0a17a4cbbb822 (diff) | |
Add scaffolding for markdown
Diffstat (limited to 'mammoth/writers/__init__.py')
| -rw-r--r-- | mammoth/writers/__init__.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mammoth/writers/__init__.py b/mammoth/writers/__init__.py index 04a64d7..376b322 100644 --- a/mammoth/writers/__init__.py +++ b/mammoth/writers/__init__.py @@ -1,5 +1,19 @@ from .html import HtmlWriter +from .markdown import MarkdownWriter -def writer(): - return HtmlWriter() +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, +} |
