UVTC's Blog


I write most of my tech notes in Pandoc’s enhanced Markdown markup format. It’s easy to write and easy to read as plain text as well. To read them as as html, I keep this tiny view-mkdn.py script around:

#!/usr/bin/env python

import sys, os

if len(sys.argv) != 2:
    print "Whoops: Please pass exactly one arg: the filename."
    print "Exiting."

mkdn_filename = sys.argv[1]

pandoc_cmd = "pandoc  -s --css=/home/john/tmpl/style.css "
pandoc_cmd += "-o /tmp/foo.html " + mkdn_filename

os.system("firefox /tmp/foo.html")