aboutsummaryrefslogtreecommitdiff
path: root/mensa/backends/satyam.py
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-09-03 09:18:28 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-09-03 09:18:28 +0200
commit3d4cb8555196a08347e373b6e542f80159155261 (patch)
tree9abb893a39da87f927d3180f27e787be619f3fed /mensa/backends/satyam.py
parent0e757e1d3822a0adeeb086fbf3e56c20cb1bdb40 (diff)
downloadmensa-3d4cb8555196a08347e373b6e542f80159155261.tar.gz
mensa-3d4cb8555196a08347e373b6e542f80159155261.tar.bz2
mensa-3d4cb8555196a08347e373b6e542f80159155261.zip
Cleanup, bump version to 0.4
This version breaks backend compatibility with 0.3.x; it turns the old list-based format into an OrderedDict-based format, sorted by category. This makes the renderers cleaner and easier to write.
Diffstat (limited to 'mensa/backends/satyam.py')
-rw-r--r--mensa/backends/satyam.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mensa/backends/satyam.py b/mensa/backends/satyam.py
index bf18dc5..6d28209 100644
--- a/mensa/backends/satyam.py
+++ b/mensa/backends/satyam.py
@@ -6,6 +6,7 @@ from mensa.base import *
import re
import sys
from yapsy.IPlugin import IPlugin
+from collections import OrderedDict
class Satyam(IPlugin):
def register_restaurants(self) :
@@ -30,9 +31,9 @@ class Satyam(IPlugin):
name = name.replace("\\n", "")
name = " ".join(name.split())
name = name.replace(price, "")
-
- return [Food("Mittagstisch Express", price, "Mittagstisch", 2, name[3:-1])]
-
+ k = OrderedDict()
+ k["Mittagstisch"] = [Food("Mittagstisch Express", price, "Mittagstisch", 2, name[3:-1])]
+ return k
# if __name__ == "__main__":
# food = get_food_items()