mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
- remove default=None with argparse is redundant since it's the
default value already. - use the argparse.ArgumentDefaultsHelpFormatter as the formatter_class, to print out automatically the default values
This commit is contained in:
parent
71a5ba3283
commit
4bac1ee745
3 changed files with 13 additions and 9 deletions
|
|
@ -135,7 +135,8 @@ class Pelican(object):
|
|||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="""A tool to generate a
|
||||
static blog, with restructured text input files.""")
|
||||
static blog, with restructured text input files.""",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
|
||||
parser.add_argument(dest='path', nargs='?',
|
||||
help='Path where to find the content files.')
|
||||
|
|
@ -145,11 +146,11 @@ def main():
|
|||
parser.add_argument('-o', '--output', dest='output',
|
||||
help='Where to output the generated files. If not specified, a '
|
||||
'directory will be created, named "output" in the current path.')
|
||||
parser.add_argument('-m', '--markup', default=None, dest='markup',
|
||||
parser.add_argument('-m', '--markup', dest='markup',
|
||||
help='The list of markup language to use (rst or md). Please indicate '
|
||||
'them separated by commas.')
|
||||
parser.add_argument('-s', '--settings', dest='settings', default='',
|
||||
help='The settings of the application. Default to False.')
|
||||
parser.add_argument('-s', '--settings', dest='settings',
|
||||
help='The settings of the application.')
|
||||
parser.add_argument('-d', '--delete-output-directory',
|
||||
dest='delete_outputdir',
|
||||
action='store_true', help='Delete the output directory.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue