Rename flaskbotrc to botserverrc.
MODIFY
.gitignore
.gitignore
@@ -41,8 +41,8 @@ zulip_bots/MANIFEST.in
# Bot configuration files
zuliprc
.zuliprc
-flaskbotrc
-.flaskbotrc
+botserverrc
+.botserverrc
# mypy
.mypy_cache

MODIFY
zulip_botserver/README.md
zulip_botserver/README.md
```
-zulip-bot-server --config-file <path to flaskbotrc> --hostname <address> --port <port>
+zulip-bot-server --config-file <path to botserverrc> --hostname <address> --port <port>
```
-Example: `zulip-bot-server --config-file ~/flaskbotrc`
+Example: `zulip-bot-server --config-file ~/botserverrc`
This program loads the bot configurations from the
-config file (flaskbotrc here) and loads the bot modules.
+config file (botserverrc here) and loads the bot modules.
It then starts the server and fetches the requests to the
above loaded modules and returns the success/failure result.
-Please make sure you have a current flaskbotrc file with the
+Please make sure you have a current botserverrc file with the
configurations of the required bots.
Hostname and Port are optional arguments. Default hostname is
127.0.0.1 and default port is 5002.

MODIFY
zulip_botserver/tests/test_server.py
zulip_botserver/tests/test_server.py
@@ -88,7 +88,7 @@ class BotServerTests(BotServerTestCase):
six.assertRaisesRegex(self,
ImportError,
"Bot \"nonexistent-bot\" doesn't exists. Please "
- "make sure you have set up the flaskbotrc file correctly.",
+ "make sure you have set up the botserverrc file correctly.",
lambda: self.assert_bot_server_response(
available_bots=available_bots,
event=dict(message={'content': "@**test** test message"},

MODIFY
zulip_botserver/zulip-botserver-supervisord.conf
zulip_botserver/zulip-botserver-supervisord.conf
[program:zulip-bot-server]
-command=zulip-bot-server --config-file=<path/to/your/flaskbotrc> --hostname <address> --port <port>
+command=zulip-bot-server --config-file=<path/to/your/botserverrc> --hostname <address> --port <port>
startsecs=3
stdout_logfile=/var/log/zulip_botserver.log ; all output of your botserver will be logged here
redirect_stderr=true

MODIFY
zulip_botserver/zulip_botserver/input_parameters.py
zulip_botserver/zulip_botserver/input_parameters.py
@@ -3,14 +3,14 @@ import argparse
def parse_args() -> argparse.Namespace:
usage = '''
- zulip-bot-server --config-file <path to flaskbotrc> --hostname <address> --port <port>
- Example1: zulip-bot-server --config-file ~/flaskbotrc
- Example2: zulip-bot-server --config-file ~/flaskbotrc -b mybotname
+ zulip-bot-server --config-file <path to botserverrc> --hostname <address> --port <port>
+ Example1: zulip-bot-server --config-file ~/botserverrc
+ Example2: zulip-bot-server --config-file ~/botserverrc -b mybotname
(This program loads the bot configurations from the
- config file (flaskbotrc here) and loads the bot modules.
+ config file (botserverrc here) and loads the bot modules.
It then starts the server and fetches the requests to the
above loaded modules and returns the success/failure result)
- Please make sure you have a current flaskbotrc file with the
+ Please make sure you have a current botserverrc file with the
configurations of the required bots.
Hostname and Port are optional arguments. Default hostname is
127.0.0.1 and default port is 5002.
@@ -22,7 +22,7 @@ def parse_args() -> argparse.Namespace:
'--config-file',
action='store',
required=True,
- help='Config file for the zulip bot server (flaskbotrc)'
+ help='Config file for the zulip bot server (botserverrc)'
)
parser.add_argument(
'--bot-config-file',

MODIFY
zulip_botserver/zulip_botserver/server.py
zulip_botserver/zulip_botserver/server.py
@@ -56,7 +56,7 @@ def load_lib_modules(available_bots: List[str]) -> Dict[str, Any]:
except ImportError:
raise ImportError(
"\nImport Error: Bot \"{}\" doesn't exists. "
- "Please make sure you have set up the flaskbotrc file correctly.\n".format(bot)
+ "Please make sure you have set up the botserverrc file correctly.\n".format(bot)
)
return bots_lib_module
@@ -110,7 +110,7 @@ def handle_bot() -> Union[str, BadRequest]:
break
else:
return BadRequest("Cannot find a bot with email {} in the bot server "
- "configuration file. Do the emails in your flaskbotrc "
+ "configuration file. Do the emails in your botserverrc "
"match the bot emails on the server?".format(event['bot_email']))
lib_module = app.config.get("BOTS_LIB_MODULES", {})[bot]
bot_handler = app.config.get("BOT_HANDLERS", {})[bot]

Rename flaskbotrc to botserverrc.