Skip to content

Instantly share code, notes, and snippets.

View engineervix's full-sized avatar
:octocat:

Victor Miti engineervix

:octocat:
View GitHub Profile
@engineervix
engineervix / mkdown2html_and_pdf.py
Last active April 2, 2023 14:09
convert markdown to html and pdf using Python
import markdown2 # pip install markdown2
import os
import sys
import pdfkit # for pdf output (uses wkhtml2pdf, which must be in your PATH)
# adapted from http://is.gd/yetava
# usage: python mkdown2html_and_pdf.py input.md your_custom_stylesheet.css
DEFAULT_EXTRAS = [
'fenced-code-blocks',