From 83f74ce7994a0f887fa7718fa0b3b3c59b70bb9a Mon Sep 17 00:00:00 2001 From: Blallo Date: Sun, 17 Feb 2019 19:20:08 +0100 Subject: [PATCH] Improve help in cli --- bot_z/cli.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/bot_z/cli.py b/bot_z/cli.py index 996839f..0ce1581 100644 --- a/bot_z/cli.py +++ b/bot_z/cli.py @@ -157,7 +157,7 @@ def start_daemon_command( @click.pass_context def list_command(ctx: click.Context, status: bool) -> None: """ - Shows the clients attached + Lists the clients attached """ logger.debug('Invoked the "list" command.') with PLifo(ctx.obj["lifo"]) as lifo: @@ -181,7 +181,7 @@ def list_command(ctx: click.Context, status: bool) -> None: @click.pass_context def start_command(ctx: click.Context, name: str) -> None: """ - Writes on the fifo. Invokes the start of a client. + Starts a client. """ logger.debug("Sending the start command down the pipe: %s", ctx.obj["fifo"]) with open(ctx.obj["fifo"], "w") as fifo: @@ -193,8 +193,7 @@ def start_command(ctx: click.Context, name: str) -> None: @click.pass_context def stop_daemon_command(ctx: click.Context) -> None: """ - Writes on the fifo. Invokes the stop of all the clients and the - subsequent shutdown of the daemon. + Stops all the clients and shuts down the daemon. """ logger.debug("Sending the stop-daemon command down the pipe: %s", ctx.obj["fifo"]) with open(ctx.obj["fifo"], "w") as fifo: @@ -207,7 +206,7 @@ def stop_daemon_command(ctx: click.Context) -> None: @click.pass_context def stop_command(ctx: click.Context, name: T.Optional[str]) -> None: """ - Writes on the fifo. Invokes the stop. + Stops a client. """ logger.debug("Sending the stop command down the pipe: %s", ctx.obj["fifo"]) name = _check_name(ctx.obj["lifo"], name) @@ -256,7 +255,7 @@ def login_command( force: bool, ) -> None: """ - Writes on the fifo. Invokes the stop. + Logs a client in using the provided credentials. """ no_userpass = username is None or password is None if credfile is not None and no_userpass: @@ -301,7 +300,7 @@ def login_command( @click.pass_context def logout_command(ctx: click.Context, name: T.Optional[str], force: bool) -> None: """ - Writes on the fifo. Invokes the stop. + Logs a logged in client out. """ logger.debug("Sending the logout command down the pipe: %s", ctx.obj["fifo"]) name = _check_name(ctx.obj["lifo"], name) @@ -316,7 +315,7 @@ def logout_command(ctx: click.Context, name: T.Optional[str], force: bool) -> No @click.pass_context def reload_command(ctx: click.Context, name: T.Optional[str]) -> None: """ - Writes on the fifo. Invokes the reload. + Resets a client to a clean state (discards the session). """ logger.debug("Sending the reload command down the pipe: %s", ctx.obj["fifo"]) name = _check_name(ctx.obj["lifo"], name) @@ -330,7 +329,7 @@ def reload_command(ctx: click.Context, name: T.Optional[str]) -> None: @click.pass_context def status_command(ctx: click.Context, name: T.Optional[str]) -> None: """ - Writes on the fifo. Queries the status. + Displays basic info on the state of a client. """ try: name = _check_name(ctx.obj["lifo"], name)