From 0f32983003db471d8ddd813834dd609f8a138cb4 Mon Sep 17 00:00:00 2001 From: Wolfgang Nowak Date: Thu, 31 Aug 2023 19:48:18 +0200 Subject: [PATCH] Check for given filename --- md2html.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/md2html.py b/md2html.py index a6a48a6..87eeebc 100755 --- a/md2html.py +++ b/md2html.py @@ -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"