diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-08-28 17:27:55 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-08-28 17:27:55 +0200 |
commit | 0e757e1d3822a0adeeb086fbf3e56c20cb1bdb40 (patch) | |
tree | 5939da7e0eae26f8d7ca48639230cb47874d90e7 /mensa/frontends/plain-text.py | |
parent | 81f8785b36a11b98e8bf0051e560e4161d6c50dc (diff) | |
download | mensa-0e757e1d3822a0adeeb086fbf3e56c20cb1bdb40.tar.gz mensa-0e757e1d3822a0adeeb086fbf3e56c20cb1bdb40.tar.bz2 mensa-0e757e1d3822a0adeeb086fbf3e56c20cb1bdb40.zip |
Added option for position, radius and distances, more plugins
Diffstat (limited to 'mensa/frontends/plain-text.py')
-rw-r--r-- | mensa/frontends/plain-text.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mensa/frontends/plain-text.py b/mensa/frontends/plain-text.py index 9147133..36b2a34 100644 --- a/mensa/frontends/plain-text.py +++ b/mensa/frontends/plain-text.py @@ -10,6 +10,9 @@ class TextRenderer(IPlugin) : if not food : continue r = r+"*"*20+restaurant.human_name+"*"*20+"\n"#+base.formt(food) + if "pos" in options and restaurant.pos and "dist" in options : + ## display distance to restaurant + r=r+"Distance: %.2f km\n" % base.dist(options["pos"], restaurant.pos) food.sort(key=lambda foo: foo.category) for i in food: if options["only_student_prices"] : |