aboutsummaryrefslogtreecommitdiff
path: root/base.py
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-10-04 15:25:10 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-10-04 15:25:10 +0200
commit6672aad7101f3593fde1009c36d0dde92ebc6512 (patch)
tree93f7f7b8fc1ed255ce76bfb299fad43663a00b98 /base.py
parent43da93801ba35497c41a745f61c6c23739e7871a (diff)
downloadmensa-6672aad7101f3593fde1009c36d0dde92ebc6512.tar.gz
mensa-6672aad7101f3593fde1009c36d0dde92ebc6512.tar.bz2
mensa-6672aad7101f3593fde1009c36d0dde92ebc6512.zip
Fixed backends, make run script configurable
Diffstat (limited to 'base.py')
-rw-r--r--base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/base.py b/base.py
index 2660607..df7bd4a 100644
--- a/base.py
+++ b/base.py
@@ -11,6 +11,13 @@ class Food :
class NoMenuError(Exception) :
""" gets raised if there's no menu"""
+
+class Frontend(object) :
+ def __init__(self, name, human_name, description="", optional_args=[]) :
+ self.name = name
+ self.human_name = human_name
+ self.description = description
+ self.optional_args = []
def formt (food) :
cat = []
@@ -40,7 +47,6 @@ class Restaurant(object):
def get_food(self,**opt_args) :
return self.module.get_food_items(*self.obligatory_args, **opt_args)
-
def register_restaurant(restaurant):
global foodsources
foodsources[restaurant.name] = (restaurant)