def getShelf(): """ Return an instance of shelve.Shelf, in which we store hashes of the previously processed datasets. """ path = os.path.join(util.root(), "db", "shelf") return shelve.open(path)
def getConfig(): """ Reads JSON configuration from etc/config.json """ with open(os.path.join(util.root(), "etc", "config.json"), "r") as configFile: return json.loads(configFile.read())