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.
This commit is contained in:
parent
57f7088304
commit
f6440e5b65
|
@ -45,15 +45,8 @@ def name_and_path_match(given_name, path_to_bot):
|
||||||
def parse_args():
|
def parse_args():
|
||||||
# type: () -> argparse.Namespace
|
# type: () -> argparse.Namespace
|
||||||
usage = '''
|
usage = '''
|
||||||
zulip-run-bot <bot_name>
|
zulip-run-bot <bot_name> --config-file ~/zuliprc
|
||||||
Example: zulip-run-bot followup
|
zulip-run-bot --help
|
||||||
(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.
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(usage=usage)
|
parser = argparse.ArgumentParser(usage=usage)
|
||||||
|
@ -67,7 +60,8 @@ def parse_args():
|
||||||
|
|
||||||
parser.add_argument('--config-file',
|
parser.add_argument('--config-file',
|
||||||
action='store',
|
action='store',
|
||||||
help='(alternate config file to ~/.zuliprc)')
|
required=True,
|
||||||
|
help='zulip configuration file (e.g. ~/Downloads/zuliprc)')
|
||||||
|
|
||||||
parser.add_argument('--force',
|
parser.add_argument('--force',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|
Loading…
Reference in a new issue