diff --git a/md2html.py b/md2html.py index 7cd2ec9..a6a48a6 100755 --- a/md2html.py +++ b/md2html.py @@ -6,8 +6,13 @@ """ import sys, markdown2 as markdown -markdown.Markdown.extras=["break-on-newline","footnotes"] -mdfile = sys.argv[1] +markdown.Markdown.extras = ["break-on-newline", "footnotes"] + +try: + mdfile = sys.argv[1] +except: + sys.exit("No file, honey.") + headline = mdfile.split(".md")[0] htmlfilename = headline + ".html" myhead = "" + headline + ""