refactor: clearer args
This commit is contained in:
@@ -12,7 +12,7 @@ class Parameters:
|
||||
source_sets_path: str | None = None
|
||||
target_path: str | None = None
|
||||
target_name: str = "glyph"
|
||||
functions: bool = True
|
||||
functions: bool = False
|
||||
verbose: bool = False
|
||||
quiet: bool = False
|
||||
|
||||
@@ -31,41 +31,56 @@ def parse_parameters(args: typing.Sequence[str]) -> Parameters:
|
||||
"-i",
|
||||
"--input",
|
||||
required=True,
|
||||
metavar="INPUT_FILE",
|
||||
dest="source_image_path",
|
||||
help="png 8x8 glyph map",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-n",
|
||||
"--name",
|
||||
metavar="NAME",
|
||||
dest="target_name",
|
||||
help="target derived name for GLSL constants and functions (default: glyph)",
|
||||
default=default_values.target_name,
|
||||
)
|
||||
parser.add_argument(
|
||||
"-o", "--output", required=True, dest="target_path", help="output glsl file"
|
||||
"-o",
|
||||
"--output",
|
||||
metavar="OUTPUT_FILE",
|
||||
required=True,
|
||||
dest="target_path",
|
||||
help="output glsl file",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--glyph-names", dest="source_names_path", help="glyphs names, one line each"
|
||||
"-g",
|
||||
"--glyph-names",
|
||||
metavar="NAMES_FILE",
|
||||
dest="source_names_path",
|
||||
help="glyphs names, one line each",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-s",
|
||||
"--sets",
|
||||
metavar="SETS_FILE",
|
||||
dest="source_sets_path",
|
||||
help="defined sets in CSV: index,length,name",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-f",
|
||||
"--functions",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=default_values.functions,
|
||||
help="add GLSL functions to output (default)",
|
||||
help="add GLSL functions to output",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-v",
|
||||
"--verbose",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=default_values.verbose,
|
||||
help="more verbose logging",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-q",
|
||||
"--quiet",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=default_values.quiet,
|
||||
|
||||
Reference in New Issue
Block a user