Skip to content

suqingdong/md2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI - Version PyPI - Status

A user-friendly tool for converting Markdown to HTML

Installation

pip install md2html-python

Usage

Use in CMD

md2html --help

md2html --version

md2html input.md -o output.html

md2html input.md -o output.html --styles-css your_styles.css

Use in Python

from md2html.core import MD2HTML

content = '''
# Hello World

This is a test.
'''

md2html = MD2HTML(content)

md2html.convert('output.html')

html = md2html.convert()
print(html)

Generate Pygments CSS

# List all available styles
pygmentize -L styles

# Generate css for given style
pygmentize -S default -f html -a .highlight > pygments.css

Support Features

  • TOC
  • Code block
  • Inline code
  • Latex
  • Table
  • Image as B64
  • Mermaid
  • Checkbox
  • Details
  • Definition
  • Emoji
  • Tabbed

Demo


Thanks

About

A user-friendly tool to convert markdown to html

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published