Check for given filename
This commit is contained in:
parent
dc42bd5843
commit
46af61f87b
1 changed files with 7 additions and 2 deletions
|
@ -7,7 +7,12 @@
|
|||
import sys, markdown2 as markdown
|
||||
|
||||
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 = "<!DOCTYPE HTML><html><head><title>" + headline + "</title></head><body>"
|
||||
|
|
Loading…
Reference in a new issue