Skip to content

Commit

Permalink
Simplify usage string
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer01 committed Oct 5, 2024
1 parent 44f507a commit 6398a80
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/cmdargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ def add_common_args(parser_or_group: ArgumentParser) -> None:

def prepare_arglist_ids(args: Sequence[str]) -> Namespace:
parser, par_file, par_cmd = create_parsers()
par_cmd.usage = (
'\n ids.py -start #number -end #number [options...] [extra tags...]'
'\n ids.py -start #number -count #number [options...] [extra tags...]'
'\n ids.py --use-id-sequence [options...] [extra tags...]'
)

par_file.add_argument('-path', metavar='#filepath', required=True, help=HELP_ARG_CMDFILE, type=valid_filepath_abs)
arggr_start_or_seq = par_cmd.add_mutually_exclusive_group(required=True)
Expand All @@ -190,6 +195,11 @@ def prepare_arglist_ids(args: Sequence[str]) -> Namespace:

def prepare_arglist_pages(args: Sequence[str]) -> Namespace:
parser, par_file, par_cmd = create_parsers()
par_cmd.usage = (
'\n pages.py -start #number -end #number [options...] [extra tags...]'
'\n pages.py -start #number -pages #number [options...] [extra tags...]'
'\n pages.py -get_maxid [options...] [extra tags...]'
)

par_file.add_argument('-path', metavar='#filepath', required=True, help=HELP_ARG_CMDFILE, type=valid_filepath_abs)
par_cmd.add_argument('-start', metavar='#number', default=1, help=HELP_ARG_PAGE_START, type=positive_nonzero_int)
Expand Down
2 changes: 1 addition & 1 deletion src/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, subfolder: str, extra_tags: list[str], quality: Quality, dura
self.minrating: int = minrating or 0
self.minscore: int | None = minscore
self.untagged_policy: str = utp or ''
self.id_sequence: list[int] = id_sequence or []
self.id_sequence: list[int] = id_sequence or list()

@property
def utp(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
APP_NAME = 'NM'
APP_VER_MAJOR = '1'
APP_VER_SUB = '8'
APP_REVISION = '458'
APP_REVISION = '459'
APP_VERSION = f'{APP_VER_MAJOR}.{APP_VER_SUB}.{APP_REVISION}'

#
Expand Down

0 comments on commit 6398a80

Please sign in to comment.