add short aliases for subcommands
This commit is contained in:
parent
d06ea132af
commit
f5f338f386
|
@ -854,7 +854,7 @@ argparser.add_argument(
|
||||||
)
|
)
|
||||||
subparsers = argparser.add_subparsers(title="subcommands", required=True)
|
subparsers = argparser.add_subparsers(title="subcommands", required=True)
|
||||||
|
|
||||||
parser_extract = subparsers.add_parser('extract', help='extract zipfiles')
|
parser_extract = subparsers.add_parser('extract', aliases=['x', 'ex'], help='extract zipfiles')
|
||||||
parser_extract.add_argument(
|
parser_extract.add_argument(
|
||||||
'-r', '--remove',
|
'-r', '--remove',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
@ -869,7 +869,7 @@ parser_extract.add_argument(
|
||||||
)
|
)
|
||||||
parser_extract.set_defaults(func=extract)
|
parser_extract.set_defaults(func=extract)
|
||||||
|
|
||||||
parser_fetch = subparsers.add_parser('fetch', help='fetch metadata and thumbnails')
|
parser_fetch = subparsers.add_parser('fetch', aliases=['f', 'fet'], help='fetch metadata and thumbnails')
|
||||||
parser_fetch.add_argument(
|
parser_fetch.add_argument(
|
||||||
'-l', '--locale',
|
'-l', '--locale',
|
||||||
type=str,
|
type=str,
|
||||||
|
@ -882,6 +882,7 @@ parser_fetch.set_defaults(func=fetch)
|
||||||
|
|
||||||
parser_collate = subparsers.add_parser(
|
parser_collate = subparsers.add_parser(
|
||||||
'collate',
|
'collate',
|
||||||
|
aliases=['c', 'co', 'col'],
|
||||||
help='collate each work into a sequence of image files',
|
help='collate each work into a sequence of image files',
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
description=textwrap.dedent("""\
|
description=textwrap.dedent("""\
|
||||||
|
@ -928,6 +929,7 @@ parser_collate.set_defaults(func=collate)
|
||||||
|
|
||||||
parser_manual_collate = subparsers.add_parser(
|
parser_manual_collate = subparsers.add_parser(
|
||||||
'manual-collate',
|
'manual-collate',
|
||||||
|
aliases=['mc', 'man', 'manual'],
|
||||||
help='collate a single work manually',
|
help='collate a single work manually',
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
description=textwrap.dedent("""\
|
description=textwrap.dedent("""\
|
||||||
|
@ -970,11 +972,11 @@ parser_manual_collate.add_argument(
|
||||||
)
|
)
|
||||||
parser_manual_collate.set_defaults(func=manual_collate)
|
parser_manual_collate.set_defaults(func=manual_collate)
|
||||||
|
|
||||||
parser_analyze = subparsers.add_parser('analyze', help='analyze an extracted folder to assist in collation')
|
parser_analyze = subparsers.add_parser('analyze', aliases=['a', 'an', 'anal'], help='analyze an extracted folder to assist in collation')
|
||||||
parser_analyze.add_argument('work_id')
|
parser_analyze.add_argument('work_id')
|
||||||
parser_analyze.set_defaults(func=analyze)
|
parser_analyze.set_defaults(func=analyze)
|
||||||
|
|
||||||
parser_metadata = subparsers.add_parser('metadata', help='view or modify metadata for a work')
|
parser_metadata = subparsers.add_parser('metadata', aliases=['m', 'me', 'meta'], help='view or modify metadata for a work')
|
||||||
parser_metadata.add_argument('work_id')
|
parser_metadata.add_argument('work_id')
|
||||||
parser_metadata.add_argument(
|
parser_metadata.add_argument(
|
||||||
'--virtual',
|
'--virtual',
|
||||||
|
@ -985,6 +987,7 @@ parser_metadata.set_defaults(func=metadata)
|
||||||
|
|
||||||
parser_generate = subparsers.add_parser(
|
parser_generate = subparsers.add_parser(
|
||||||
'generate',
|
'generate',
|
||||||
|
aliases=['g', 'gen'],
|
||||||
help='generate HTML/CSS/JS for library site',
|
help='generate HTML/CSS/JS for library site',
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
description=textwrap.dedent("""\
|
description=textwrap.dedent("""\
|
||||||
|
|
Loading…
Reference in a new issue