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