Check for given filename

This commit is contained in:
Wolfgang Nowak 2022-09-29 23:18:49 +02:00
parent dc42bd5843
commit 46af61f87b

View file

@ -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>"