GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - codeDroid1/md2all

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
md2all
md2all
 
 
scripts
scripts
 
 
test_data
test_data
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
example.py
example.py
 
 
requirements.txt
requirements.txt
 
 
run.sh
run.sh
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

๐Ÿ“ md2all

A minimal Python package to convert Markdown files to clean, responsive HTML with Tailwind CSS, MathJax, and beautiful typography.

Ideal for note-taking, documentation, and publishing markdown content as styled web pages.

PyPI Python Version License


๐Ÿš€ Features

  • ๐Ÿงช Convert .md files into HTML
  • ๐ŸŽจ Built-in support for Tailwind CSS
  • ๐Ÿงฎ Renders LaTeX/Math using MathJax
  • โœจ Applies prose styling for readability
  • ๐Ÿ—‚ Outputs to your desired directory

Install Dependencies

๐Ÿ› ๏ธ For Debian/Ubuntu:

sudo apt update
sudo apt install -y \
    libavif13 \
    libgstreamer-plugins-base1.0-0 \
    gstreamer1.0-plugins-base \
    gstreamer1.0-plugins-good \
    gstreamer1.0-libav \
    libgstreamer-gl1.0-0 \
    libgstreamer-plugins-bad1.0-0 \
    libgstreamer-plugins-base1.0-dev

๐Ÿ› ๏ธ For CentOS/RHEL/Fedora:

sudo dnf install -y \
    gstreamer1-plugins-base \
    gstreamer1-plugins-good \
    gstreamer1-plugins-bad-free \
    gstreamer1-libav \
    libavif

๐Ÿ“ฆ Installation

pip install md2all

Screenshots

Check the test_data for the example mardown file and the output HTML and Pdf files.

Screenshot

Upcoming Features

  • ๐Ÿ“œ Support for custom CSS
  • Support for PDF generation
  • Support for custom themes
  • Support for custom fonts

How to Use it

Sure! Here's a concise and developer-friendly documentation for using the convert_markdown function as part of your Python library (assuming it's installed from PyPI):


๐Ÿ“„ convert_markdown

Convert a Markdown (.md) file into a styled HTML file with TailwindCSS and MathJax support.


๐Ÿ”ง Function Signature

convert_markdown(md_path: str, output_dir="output", output_format="pdf")
convert_markdown(md_path: str, output_dir="output", output_format="html")

โœจ Features

  • Converts .md files to clean, styled HTML
  • Supports LaTeX math using $$...$$ (rendered via MathJax)
  • Automatically applies Tailwind CSS and custom styling
  • Resolves relative paths and saves output to the desired directory

๐Ÿ“ฅ Parameters

Name Type Description
md_path str Path to the input Markdown file. Can be relative or absolute.
output_dir str (Optional) Directory to save the converted file. Defaults to input file's directory.
output_format str (Optional) Set to "html" to output HTML. Default is "pdf", but PDF is not implemented yet.

๐Ÿ“ค Returns

  • Full path to the converted file.

๐Ÿงช Example Usage

from md2all import convert_markdown

# Convert a Markdown file to HTML
output_file = convert_markdown("notes/my_notes.md", output_dir="output", output_format="html")

print("File saved to:", output_file)

๐Ÿ“ Output Structure

  • create a .html file to your specified output_dir, if not provided, it will be saved in the same directory as the input file.
  • Includes all CSS and MathJax setup in the HTML head section. all css and js library are inside /home/.lib/

Author

  • Deepak Raj

Why Md2all?

  • I created this library to simplify the process of converting Markdown files into styled HTML/PDF documents for the system which doesn't have access to CDN/Internet. So, I made it a standalone library that can be used in any environment without the need for external resources.

About

No description, website, or topics provided.

Resources

Readme
License
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.