Skip to content

Yet another script that converts GitHub Flavored Markdown files to HTML.

License

Notifications You must be signed in to change notification settings

takistakis/markdown2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown2html

Yet another script that converts GitHub Flavored Markdown files to HTML.

It is inspired by grip, and is an attempt to replicate it without its dependencies and without the need to interact directly with GitHub, or even being connected to the internet. The first time it runs, github-markdown.css is downloaded and stored in ~/.cache and from then on, it can be used while being offline. Generated HTML is put at /tmp by default.

Note that GitHub doesn't use pygments anymore for syntax highlighting, so it's difficult to generate the same CSS classes to use its colorscheme, and pygments doesn't include a similar one. For now, markdown2html uses the tango style which comes built-in with pygments.

Requirements

Install with:

$ pip install markdown pygments docopt

Optionally, if pymdown_extensions is present, extensions extra, magiclink, tasklist, highlight and tilde are used.

Usage

markdown2html [options] <file>

Options:
  -o, --out <file>      Write output to <file>
  -f, --force           Overwrite existing CSS file
  -p, --preview         Open generated HTML file in browser
  -i, --interval <int>  Refresh page every <int> seconds
  -q, --quiet           Show less information
  -h, --help            Show this help message and exit

License

Licensed under GPLv3 or later.

About

Yet another script that converts GitHub Flavored Markdown files to HTML.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages