Skip to main content

No project description provided

Project description

Python Markdown-to-HTML Server

It's the standard Python http.server module but via markdown-it-py, requested Markdown files are rendered and served as HTML

The http.server module's SimpleHTTPRequestHandler class is inherited by a new class with its do_GET method overridden. beautifulsoup and html5lib add <html>, <head>, & <body> elements and I insert a <style> element with some personally preferred CSS styling.

It makes for a simple way to write up some Markdown with a terminal & a web browser

TIP: In most browsers, keyboard shortcut Ctrl+Shift+R will refresh the page and ignore cache

Installation

  • from PyPI: pip install httpmdhtml
  • from GitHub: pip install "git+https://github.com/treatmesubj/python-md-to-html-server"

Usage Example

Markdown-to-HTML Server

python -m httpmdhtml.server -d . -b 127.0.0.1

Just Convert Markdown to HTML File

python -m httpmdhtml.md_to_html -i in_file.md -o out_file.html

Convert Markdown to HTML File & Embed Base64-Encoded Local Images in HTML File

python -m httpmdhtml.md_to_html -i in_file.md -o out_file.html --encode_local_images

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

httpmdhtml-0.0.3.tar.gz (16.4 kB view hashes)

Uploaded Source

Built Distribution

httpmdhtml-0.0.3-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

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