[scripts/init] add '-C' command-line option
This commit is contained in:
@@ -323,6 +323,9 @@ def parse_args(args=None):
|
||||
parser.add_argument("-s", "--site", metavar="TITLE")
|
||||
parser.add_argument("-t", "--type", metavar="TYPE")
|
||||
parser.add_argument("-c", "--copyright", metavar="NAME")
|
||||
parser.add_argument(
|
||||
"-C",
|
||||
action="store_const", const="Mike Fährmann", dest="copyright")
|
||||
parser.add_argument(
|
||||
"-F", "--force",
|
||||
action="store_const", const="w", default="x", dest="open_mode")
|
||||
@@ -350,15 +353,9 @@ def parse_opts(args=None):
|
||||
"site_name" : args.site,
|
||||
"type" : args.type,
|
||||
"open_mode" : args.open_mode,
|
||||
"copyright" : args.copyright,
|
||||
}
|
||||
|
||||
if copyright := args.copyright:
|
||||
if len(copyright) == 1:
|
||||
copyright = "Mike Fährmann"
|
||||
opts["copyright"] = copyright
|
||||
else:
|
||||
opts["copyright"] = ""
|
||||
|
||||
if root := args.root:
|
||||
if "://" in root:
|
||||
root = root.rstrip("/")
|
||||
|
||||
Reference in New Issue
Block a user