From f6440e5b65a12d97e04ea3aa81044e12aef4f7db Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 20 Nov 2017 14:45:52 -0800 Subject: [PATCH] Require --config-file and simplify command line usage. We now require users to specify where their config file is located, and we no longer default to ~/.zuliprc. As part of this, we needed to make the "usage" more accurate in the command line, which I mostly achieved by cutting out unnecessary stuff. --- zulip_bots/zulip_bots/run.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/zulip_bots/zulip_bots/run.py b/zulip_bots/zulip_bots/run.py index e84eafa..de22330 100755 --- a/zulip_bots/zulip_bots/run.py +++ b/zulip_bots/zulip_bots/run.py @@ -45,15 +45,8 @@ def name_and_path_match(given_name, path_to_bot): def parse_args(): # type: () -> argparse.Namespace usage = ''' - zulip-run-bot - Example: zulip-run-bot followup - (This program loads bot-related code from the - library code and then runs a message loop, - feeding messages to the library code to handle.) - Please make sure you have a current ~/.zuliprc - file with the credentials you want to use for - this bot. - See lib/readme.md for more context. + zulip-run-bot --config-file ~/zuliprc + zulip-run-bot --help ''' parser = argparse.ArgumentParser(usage=usage) @@ -67,7 +60,8 @@ def parse_args(): parser.add_argument('--config-file', action='store', - help='(alternate config file to ~/.zuliprc)') + required=True, + help='zulip configuration file (e.g. ~/Downloads/zuliprc)') parser.add_argument('--force', action='store_true',