chore: better cli params for ui configs
This commit is contained in:
+12
-6
@@ -9,7 +9,7 @@ service = typer.Typer(no_args_is_help=True)
|
||||
REPO_ROOT = get_git_root(__file__)
|
||||
|
||||
|
||||
@service.command()
|
||||
@service.command(no_args_is_help=True)
|
||||
def add(
|
||||
name: str = typer.Option(..., "--name", "-n"),
|
||||
user: str = typer.Option(..., "--user", "-u"),
|
||||
@@ -17,10 +17,16 @@ def add(
|
||||
..., "--ioc-description", "-d", help="See <repo-root>/docs/ioc/ioc_overview.md for examples"
|
||||
),
|
||||
ui_name: str = typer.Option(
|
||||
..., "--ui-name", help="See <repo-root>/qt/A_BD_ServiceManager.ui for examples"
|
||||
...,
|
||||
"--ui-name",
|
||||
help="This is the name that will be used for the service in the UI."
|
||||
"See <repo-root>/qt/A_BD_ServiceManager.ui for examples",
|
||||
),
|
||||
panelcmd: str = typer.Option(
|
||||
..., "--panelcmd", "-p", help="See <repo-root>/qt/A_BD_ServiceManager.ui for examples"
|
||||
ui_filename: str = typer.Option(
|
||||
...,
|
||||
"--ui-filename",
|
||||
"-f",
|
||||
help="The <ui-filename> in 'A_BD_<ui-filename>.ui'; See <repo-root>/qt/A_BD_ServiceManager.ui for examples",
|
||||
),
|
||||
):
|
||||
init_logging()
|
||||
@@ -28,12 +34,12 @@ def add(
|
||||
user=user, # TODO: read from 'whoami'?
|
||||
ioc_description=ioc_description,
|
||||
ui_name=ui_name, # TODO: make this standard?
|
||||
panelcmd=panelcmd, # TODO: make this standard?
|
||||
ui_filename=ui_filename, # TODO: make this standard?
|
||||
)
|
||||
service_creator.add_service(name=name)
|
||||
|
||||
|
||||
@service.command()
|
||||
@service.command(no_args_is_help=True)
|
||||
def list():
|
||||
registry = ServiceRegistry.read_from_config()
|
||||
services = registry.get_services()
|
||||
|
||||
Reference in New Issue
Block a user