Skip to content

Commit

Permalink
🐛📝 Clean up documentation of CLI.
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed May 23, 2024
1 parent a583612 commit a5aa0c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
13 changes: 12 additions & 1 deletion ozi/fix/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@
from argparse import ArgumentParser
from argparse import BooleanOptionalAction

parser = ArgumentParser(description=sys.modules[__name__].__doc__, add_help=False)
parser = ArgumentParser(
prog='ozi-fix',
description=sys.modules[__name__].__doc__,
add_help=False,
usage='%(prog)s [options] | [positional arguments]',
)
subparser = parser.add_subparsers(help='source & test fix', dest='fix')

helpers = parser.add_mutually_exclusive_group()
helpers.add_argument('-h', '--help', action='help', help='show this help message and exit')
missing_parser = subparser.add_parser(
'missing',
prog='ozi-fix missing',
aliases=['m'],
usage='%(prog)s [options] [output] target',
allow_abbrev=True,
help='Check for missing files in an OZI project.',
)
Expand Down Expand Up @@ -58,11 +65,15 @@
source_parser = subparser.add_parser(
'source',
aliases=['s'],
prog='ozi-fix source',
usage='%(prog)s [options] [output] target',
allow_abbrev=True,
help='Create a new Python source in an OZI project.',
)
test_parser = subparser.add_parser(
'test',
prog='ozi-fix test',
usage='%(prog)s [options] [output] target',
aliases=['t'],
allow_abbrev=True,
help='Create a new Python test in an OZI project.',
Expand Down
5 changes: 3 additions & 2 deletions ozi/new/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
prog='ozi-new',
description=sys.modules[__name__].__doc__,
add_help=False,
usage='%(prog)s [options] [PKG-INFO required] [PKG-INFO optional] [PKG-INFO defaults] [defaults] target',
)
subparser = parser.add_subparsers(help='create new projects, sources, & tests', dest='new')
project_parser = subparser.add_parser(
Expand All @@ -30,10 +31,10 @@
description='Create a new OZI wrapdb file.',
)
required = project_parser.add_argument_group('PKG-INFO required')
ozi_required = project_parser.add_argument_group('required')
ozi_defaults = project_parser.add_argument_group('defaults')
optional = project_parser.add_argument_group('PKG-INFO optional')
defaults = project_parser.add_argument_group('PKG-INFO defaults')
ozi_defaults = project_parser.add_argument_group('defaults')
ozi_required = project_parser.add_argument_group('required')
ozi_defaults.add_argument(
'-c',
'--copyright-head',
Expand Down

0 comments on commit a5aa0c2

Please sign in to comment.