mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #250 from AndreaCrotti/argparse
- remove default=None with argparse is redundant since it's the
This commit is contained in:
commit
b8377f50c9
3 changed files with 13 additions and 9 deletions
|
|
@ -249,7 +249,8 @@ def fields2pelican(fields, out_markup, output_path, dircat=False):
|
|||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Transform feed, Wordpress or Dotclear files to rst files."
|
||||
"Be sure to have pandoc installed")
|
||||
"Be sure to have pandoc installed",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
|
||||
parser.add_argument(dest='input', help='The input file to read')
|
||||
parser.add_argument('--wpfile', action='store_true', dest='wpfile',
|
||||
|
|
|
|||
|
|
@ -183,14 +183,16 @@ def ask(question, answer=str, default=None, l=None):
|
|||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="A kickstarter for pelican")
|
||||
parser = argparse.ArgumentParser(
|
||||
description="A kickstarter for pelican",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
parser.add_argument('-p', '--path', default=".",
|
||||
help="The path to generate the blog into")
|
||||
parser.add_argument('-t', '--title', default=None, metavar="title",
|
||||
parser.add_argument('-t', '--title', metavar="title",
|
||||
help='Set the title of the website')
|
||||
parser.add_argument('-a', '--author', default=None, metavar="author",
|
||||
parser.add_argument('-a', '--author', metavar="author",
|
||||
help='Set the author name of the website')
|
||||
parser.add_argument('-l', '--lang', default=None, metavar="lang",
|
||||
parser.add_argument('-l', '--lang', metavar="lang",
|
||||
help='Set the default lang of the website')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue