Exporters API Reference¶
This page documents the exporter modules of Medium Converter.
Base Exporter¶
medium_converter.exporters.base.BaseExporter
¶
Base class for all exporters.
export(article, output=None)
abstractmethod
¶
Export an article to the target format.
| PARAMETER | DESCRIPTION |
|---|---|
article
|
The article to export
TYPE:
|
output
|
Optional output file path or file-like object
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str | bytes
|
The exported content as string or bytes |
Source code in medium_converter/exporters/base.py
Markdown Exporter¶
medium_converter.exporters.markdown.MarkdownExporter
¶
Export Medium articles to Markdown format.
export(article, output=None)
¶
Export an article to Markdown.
| PARAMETER | DESCRIPTION |
|---|---|
article
|
The article to export
TYPE:
|
output
|
Optional output file path or file-like object
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The exported content as string |
Source code in medium_converter/exporters/markdown.py
PDF Exporter¶
medium_converter.exporters.pdf.PDFExporter
¶
Export Medium articles to PDF format.
export(article, output=None)
¶
Export an article to PDF.
| PARAMETER | DESCRIPTION |
|---|---|
article
|
The article to export
TYPE:
|
output
|
Optional output file path or file-like object
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bytes
|
The exported content as bytes |