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:
parent
2282000d78
commit
0419848d3c
42 changed files with 79 additions and 45 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue