From ad1aa3375857ead62c033a963f87e7e6d23860aa Mon Sep 17 00:00:00 2001 From: Wolfgang Nowak Date: Sat, 20 Nov 2021 18:20:53 +0100 Subject: [PATCH] webgen v3.3.2 -beautified --- webgen.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webgen.py b/webgen.py index 08b7ebc..c62c08b 100755 --- a/webgen.py +++ b/webgen.py @@ -18,6 +18,11 @@ def edit(headline): return headline +def selectfile(): + kannweg = input("Moin: ") + return 23 + + # Parse arguments "--html", "--stdout" and "Some Headline" # there are 3 parameters. if --html is given, the fileending will be .html. # Else, if stdout is choosen there can be no fileending, but it will still contain html @@ -39,7 +44,9 @@ for wish in optwords: if len(args) == 1: headline = args[0] elif len(args) == 0: - headline = input("Please enter a headline: ") + headline = input("Please enter a headline or leave empty for selecting an older file: ") + if not headline: + headline = selectfile() elif len(args) > 1: sys.exit("Too much or wrong parameters:\n" + myname + ' [--html] [--stdout] ["Some Topic"] ')