Skip to main content

Extract one or multiple substrings between two start and end strings.

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 and sane_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown_convert-0.9.0.tar.gz (10.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page