Check for given filename
This commit is contained in:
parent
e5401f356e
commit
0f32983003
1 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" Liest markdownfile ein und spuckt html aus: md2html meinmarkdownfile.md
|
||||
"""
|
||||
Liest markdownfile ein und spuckt html aus: md2html meinmarkdownfile.md
|
||||
|
||||
"""
|
||||
import sys, markdown2 as markdown
|
||||
|
@ -11,7 +12,7 @@ markdown.Markdown.extras = ["break-on-newline", "footnotes"]
|
|||
try:
|
||||
mdfile = sys.argv[1]
|
||||
except:
|
||||
sys.exit("No file, honey.")
|
||||
sys.exit("No file, honey.\n"+sys.argv[0]+ ": Liest markdownfile ein und spuckt html aus: md2html meinmarkdownfile.md")
|
||||
|
||||
headline = mdfile.split(".md")[0]
|
||||
htmlfilename = headline + ".html"
|
||||
|
|
Loading…
Reference in a new issue