Skip to main content

Convert Markdown to a styled HTML document with print + dark/light toggle.

Project description

mystrotamer-tohtml

A professional CLI tool to convert Markdown files into a clean, modern, and print-friendly HTML document — with built-in Dark/Light mode, RTL support, and code copy buttons.


✨ Features

  • 🖨️ Print-friendly layout (optimized for PDFs and paper)
  • 🌙 Dark / Light mode with System preference
  • 🌍 Automatic RTL support for Arabic, Persian, Hebrew, and Urdu
  • 📋 Copy buttons on all code blocks
  • 🎨 Clean typography for headings, tables, and blockquotes
  • ⚙️ Single self-contained HTML output (no external assets)

📦 Installation

From PyPI (recommended)

pip install mystrotamer-tohtml

Local / Development

pip install -e .

🚀 Usage

Basic conversion

tohtml README.md

Generates:

README.html

Specify output file

tohtml README.md -o output.html

Arabic / RTL documents

tohtml README.md --lang ar

RTL is applied automatically based on the language.


Disable GUI file picker

(useful on servers or minimal Linux)

tohtml --no-gui README.md

⚙️ Command-line Options

Option Description
-o, --output Output HTML file path
--title Custom document title
--lang HTML language (ar, en, fa, he, …)
--footer-left Custom footer (left)
--footer-right Custom footer (right)
--no-gui Disable file picker dialog

🖥️ Notes

  • When opening the generated HTML via file://, some browsers may restrict localStorage.
  • For best results, serve the file locally:
python -m http.server 8000

Then open:

http://localhost:8000/yourfile.html

📄 License

MIT License © Tamer Hamad Faour


👤 Author

Tamer Hamad Faour
GitHub: https://github.com/TamerOnLine

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

mystrotamer_tohtml-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mystrotamer_tohtml-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file mystrotamer_tohtml-0.1.0.tar.gz.

File metadata

  • Download URL: mystrotamer_tohtml-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for mystrotamer_tohtml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 31c2b9f4a0a0850771e1911b948db14fc786010da16342ce68d07eead4bbca6c
MD5 991d38ec04906362683c44c0185555eb
BLAKE2b-256 3517c14f37c96ea0f5141430ba8294c69209791551aee0369993cd2ac95c5d61

See more details on using hashes here.

File details

Details for the file mystrotamer_tohtml-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mystrotamer_tohtml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8d0b2f96fe1aebdd0d212431fd3c45166335ecce4f7f2b0b8b3f5f3028e015c
MD5 e2c919197c82cee15f1f641156d3d7c5
BLAKE2b-256 c63d0695c82912708b9ff5bb00c97f8ecbb550e44efd76c18c12b9215244209b

See more details on using hashes here.

Supported by

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