aboutsummaryrefslogtreecommitdiff
path: root/run.py
diff options
context:
space:
mode:
Diffstat (limited to 'run.py')
-rwxr-xr-xrun.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/run.py b/run.py
new file mode 100755
index 0000000..7ea99fe
--- /dev/null
+++ b/run.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python3
+from yapsy.PluginManager import PluginManager
+backends = PluginManager()
+backends.setPluginPlaces(["./backends"])
+backends.collectPlugins()
+import base
+for pluginInfo in backends.getAllPlugins():
+ backends.activatePluginByName(pluginInfo.name)
+ pluginInfo.plugin_object.register_restaurants()
+
+for k,i in base.foodsources.items() :
+ try :
+ food = i.get_food()
+ print("*"*20+i.human_name+"*"*20+"\n"+base.formt(food))
+ except base.NoMenuError:
+ print(i.human_name + ": No menu found. This could be due to a holiday or due to an error in the script.")