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
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
httpmdhtml-0.0.3.tar.gz
(16.4 kB
view hashes)
Built Distribution
httpmdhtml-0.0.3-py3-none-any.whl
(16.9 kB
view hashes)
Close
Hashes for httpmdhtml-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82f133b99dd8cb779687d4e18a9fd2951326460e9c726b2849daaaf9b213cee5 |
|
MD5 | c19baaf8994eba2dc304f6594fd3f348 |
|
BLAKE2b-256 | ebd2b6d211ff59e9196d22afa29b8fad6898d9479ec703e0d8e434fa7cc60803 |