diff --git a/bbbmon/bbbmon.py b/bbbmon/bbbmon.py index 41242926c6d2489344689f8388e244b1711f5a57..ac2f98b9d73bfebf33d1c7a652f9af947e701ba8 100755 --- a/bbbmon/bbbmon.py +++ b/bbbmon/bbbmon.py @@ -39,7 +39,8 @@ class AliasedGroup(click.Group): @click.group(context_settings=CONTEXT_SETTINGS, cls=AliasedGroup) @click.option('--userconfig', '-u', is_flag=True, help="Use user config even if on server") -def main(userconfig): +@click.option('--watch', '-w', help="Run repeatedly with the given interval in seconds", type=click.IntRange(2, 2147483647, clamp=True)) +def main(userconfig, watch): """BBBMON is a small CLI utility to monitor bbb usage \b @@ -68,7 +69,7 @@ def main(userconfig): @click.option('--twolines', '-2', is_flag=True, help="Print essentials on two lines") @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, userconfig, short, compact, n, all_, twolines, leaderboards, participants, presenter, watch, presenter_id, meetings, endpoint, fancy): +def meetings(ctx, userconfig, watch, short, compact, n, all_, twolines, leaderboards, participants, presenter, presenter_id, meetings, endpoint, fancy): """View currently active meetings""" if short: leaderboards = False @@ -110,7 +111,7 @@ def meetings(ctx, userconfig, short, compact, n, all_, twolines, leaderboards, p @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, userconfig, new, edit, path, print_): +def config(ctx, userconfig, watch, new, edit, path, print_): """Print, show or edit the config""" user_config_path = get_user_config_path()