webgen v3.3.2 -beautified

This commit is contained in:
Wolfgang Nowak 2021-11-20 18:20:53 +01:00
parent 94cde92b57
commit ad1aa33758

View file

@ -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"] ')