contrib_bots: Restructure bots to follow a consistent structure.

Now all the bots that are stored in contrib_bots are in the
same file/directory format.
The format is specified here #3427. Add tests.py file for encrypt_bot as well.
Fixes #3427.
This commit is contained in:
Abhijeet Kaur 2017-02-09 02:35:24 +05:30 committed by showell
parent 2282000d78
commit 0419848d3c
42 changed files with 79 additions and 45 deletions

View file

@ -9,13 +9,13 @@ from six.moves import configparser as cp
from six.moves import range
home = expanduser('~')
CONFIG_PATH = home + '/zulip/contrib_bots/bots/foursquare/FourSquareBot/settings.ini'
CONFIG_PATH = home + '/zulip/contrib_bots/bots/foursquare/foursquare.config'
def get_api_key():
# settings.ini must have been moved from
# ~/zulip/contrib_bots/bots/foursquare/FourSquareBot/settings.ini into
# ~/settings.ini for program to work
# see doc.md for more information
# foursquare.config must have been moved from
# ~/zulip/contrib_bots/bots/foursquare/foursquare.config into
# ~/foursquare.config for program to work
# see readme.md for more information
with open(CONFIG_PATH) as settings:
config = cp.ConfigParser()
config.readfp(settings)