From f6c81fda774456c0705e8fe740446d2ceba9628a Mon Sep 17 00:00:00 2001 From: atoav <dh@atoav.com> Date: Wed, 29 Apr 2020 12:09:29 +0200 Subject: [PATCH] Add --short and --all options --- bbbmon/bbbmon.py | 17 ++++++++++++++--- pyproject.toml | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/bbbmon/bbbmon.py b/bbbmon/bbbmon.py index 8977c5c..02b94ac 100755 --- a/bbbmon/bbbmon.py +++ b/bbbmon/bbbmon.py @@ -298,10 +298,21 @@ def main(): @click.option('--participants/--no-participants', default=True, show_default=True, help="Hide or show the participants") @click.option('--meetings/--no-meetings', default=True, show_default=True, help="Hide or show the meetings") @click.option('--presenter/--no-presenter', default=True, show_default=True, help="Hide or show the presenters") -@click.option('--presenter-id/--no-presenter-id', default=True, show_default=True, help="Hide or show the presenter IDs") +@click.option('--presenter-id/--no-presenter-id', default=False, show_default=True, help="Hide or show the presenter IDs") +@click.option('--short', '-s', is_flag=True, help="Print less") +@click.option('--all', '-a', 'all_', is_flag=True, help="Print all") @click.option('--fancy/--no-fancy', default=True, show_default=True, help="Use fancy headers") -def meetings(ctx, leaderboards, participants, presenter, watch, presenter_id, meetings, endpoint, fancy): +def meetings(ctx, short, all_, leaderboards, participants, presenter, watch, presenter_id, meetings, endpoint, fancy): """View currently active meetings""" + if short: + leaderboards = False + if all_: + leaderboards = True + participants = True + presenter = True + presenter_id = True + meetings = True + config = init_config() config.filter_endpoints(endpoint) if watch is not None: @@ -319,7 +330,7 @@ def meetings(ctx, leaderboards, participants, presenter, watch, presenter_id, me @click.option('--edit', is_flag=True, help="Open the config in the default editor") @click.option('--print', 'print_', is_flag=True, help="Print the config to stdout") @click.option('--path', is_flag=True, help="Print the path to the config") -def config(ctx, new, edit, path, print_): +def config(ctx, new, short, edit, path, print_): """Print, show or edit the config""" user_config_path = get_user_config_path() diff --git a/pyproject.toml b/pyproject.toml index a062b92..59c7305 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bbbmon" -version = "0.1.13" +version = "0.1.14" description = "A small CLI utility to monitor bbb usage" authors = ["David Huss <david.huss@hfbk-hamburg.de>"] maintainers = ["David Huss <david.huss@hfbk-hamburg.de>"] -- GitLab