X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hubacji1/coffee-getter.git/blobdiff_plain/d87011e7960c3fb7a57030a199bdd41464500fe3..faced3c05372bd8aed4f735af649237b3b75cebb:/cbconf.py diff --git a/cbconf.py b/cbconf.py deleted file mode 100644 index 7695cd4..0000000 --- a/cbconf.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -"""Get configuration.""" -from json import loads -from os.path import dirname, abspath - -class Conf: - PATH = "{}/.cfg".format(dirname(abspath(__file__))) - - def __init__(self): - with open(Conf.PATH) as f: - self.conf = loads(f.read()) - return None - - def getCoffeebotURL(self): - """Return URL of Slack Coffeebot.""" - return self.conf["coffeebot"]["url"] - - def getCoffeeDbPath(self): - """Return the path to database with coffees.""" - return self.conf["coffeedb"]["path"]