webgen v3.3.2 -beautified
This commit is contained in:
parent
94cde92b57
commit
ad1aa33758
1 changed files with 8 additions and 1 deletions
|
@ -18,6 +18,11 @@ def edit(headline):
|
||||||
return headline
|
return headline
|
||||||
|
|
||||||
|
|
||||||
|
def selectfile():
|
||||||
|
kannweg = input("Moin: ")
|
||||||
|
return 23
|
||||||
|
|
||||||
|
|
||||||
# Parse arguments "--html", "--stdout" and "Some Headline"
|
# Parse arguments "--html", "--stdout" and "Some Headline"
|
||||||
# there are 3 parameters. if --html is given, the fileending will be .html.
|
# 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
|
# 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:
|
if len(args) == 1:
|
||||||
headline = args[0]
|
headline = args[0]
|
||||||
elif len(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:
|
elif len(args) > 1:
|
||||||
sys.exit("Too much or wrong parameters:\n" + myname + ' [--html] [--stdout] ["Some Topic"] ')
|
sys.exit("Too much or wrong parameters:\n" + myname + ' [--html] [--stdout] ["Some Topic"] ')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue