diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2017-10-04 00:42:18 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2017-10-04 00:42:18 +0200 |
commit | 2195b639091842492ea11ab8b91a631c59a7d32f (patch) | |
tree | 89188abfb8f129056c3ec45e8e76a501df694e43 /run.py | |
parent | 588a1df9f0ae350c3593156ebb102835a4124115 (diff) | |
download | mensa-2195b639091842492ea11ab8b91a631c59a7d32f.tar.gz mensa-2195b639091842492ea11ab8b91a631c59a7d32f.tar.bz2 mensa-2195b639091842492ea11ab8b91a631c59a7d32f.zip |
Modularized program
Diffstat (limited to 'run.py')
-rwxr-xr-x | run.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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.") |