Python package to convert Markdown files to other formats.
Project description
markdown-convert
Python package to convert Markdown files to other formats.
With markdown-convert
, you can easily convert a Markdown file to PDF
with the following features:
- User-defined CSS styles.
- Customizable document margins.
- Live PDF compilation.
- Manual insertion of page breaks.
To start using it, simply pip install markdown-convert
.
Usage example
from markdown_convert import MarkdownFile
MarkdownFile("markdown.md").to_pdf() # One time conversion
MarkdownFile("markdown.md").live_pdf() # Real-time conversion
Documentation
MarkdownFile
init
md_path
- Path to the Markdown file.css_path='css/default.css'
- Path to the CSS file.margin_h=62
- Horizontal margin of the PDF file.margin_v=60
- Vertical margin of the PDF file.
use
-
plugin
- Name of the extension to add to the set of used extensions.The extensions
extra
andsane_lists
are included by default.
to_html
-
output_path=None
- Path to the output HTML file.If not specified, the HTML file will have the same name, but with the
.html
extension.
to_pdf
-
output_path=None
- Path to the output PDF file.If not specified, the PDF file will have the same name, but with the
.pdf
extension.
live_pdf
-
(Takes no arguments).
The PDF file will be updated whenever the Markdown file changes on disk.
Contributing
See CONTRIBUTING.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for markdown_convert-0.9.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebf0a72d96e26483e66a37678e592237bab08233e6cb0fef86ffe1d1e73498fb |
|
MD5 | e2805f5ab5ecc0792f9bb895f4ff8b90 |
|
BLAKE2b-256 | 21fddb8f4840655d8eae6682f22a230a9dece74f7012bdce39c21fec2c8bc2c3 |