Check for given filename
This commit is contained in:
parent
dc42bd5843
commit
46af61f87b
1 changed files with 7 additions and 2 deletions
|
@ -6,8 +6,13 @@
|
||||||
"""
|
"""
|
||||||
import sys, markdown2 as markdown
|
import sys, markdown2 as markdown
|
||||||
|
|
||||||
markdown.Markdown.extras=["break-on-newline","footnotes"]
|
markdown.Markdown.extras = ["break-on-newline", "footnotes"]
|
||||||
mdfile = sys.argv[1]
|
|
||||||
|
try:
|
||||||
|
mdfile = sys.argv[1]
|
||||||
|
except:
|
||||||
|
sys.exit("No file, honey.")
|
||||||
|
|
||||||
headline = mdfile.split(".md")[0]
|
headline = mdfile.split(".md")[0]
|
||||||
htmlfilename = headline + ".html"
|
htmlfilename = headline + ".html"
|
||||||
myhead = "<!DOCTYPE HTML><html><head><title>" + headline + "</title></head><body>"
|
myhead = "<!DOCTYPE HTML><html><head><title>" + headline + "</title></head><body>"
|
||||||
|
|
Loading…
Reference in a new issue