diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2017-10-10 11:45:50 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2017-10-10 11:45:50 +0200 |
commit | c9c7d389c45815e1b7abd7bea7dc5093a3630ea2 (patch) | |
tree | 1cfd621b5de112792aa2f13ea5c4997b33d0d03e /frontends | |
parent | aa70fb739bbcb4f7a5275fc6a8dac4b3b84579e6 (diff) | |
download | mensa-c9c7d389c45815e1b7abd7bea7dc5093a3630ea2.tar.gz mensa-c9c7d389c45815e1b7abd7bea7dc5093a3630ea2.tar.bz2 mensa-c9c7d389c45815e1b7abd7bea7dc5093a3630ea2.zip |
Moved stuff to a module folder, preparing for setuptools
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/plain-text.py | 22 | ||||
-rw-r--r-- | frontends/plain-text.yapsy-plugin | 3 |
2 files changed, 0 insertions, 25 deletions
diff --git a/frontends/plain-text.py b/frontends/plain-text.py deleted file mode 100644 index 71cbf42..0000000 --- a/frontends/plain-text.py +++ /dev/null @@ -1,22 +0,0 @@ -import base -from yapsy.IPlugin import IPlugin -class TextRenderer(IPlugin) : - def render (self, foods, **options) : - ## Expects list of tuples with (Restaurant, Foodlist) - r = "" - vegkeys = [ "", "Vegetarian", "Vegan" ] - for restaurant, food in foods : - cat = [] - r = r+"*"*20+restaurant.human_name+"*"*20+"\n"#+base.formt(food) - food.sort(key=lambda foo: foo.category) - for i in food: - if not i.category in cat : - cat.append(i.category) - if not i.category == None : - r=r+ i.category+"\n" - r=r+"\t" + i.name.ljust(80) + "\t"+ i.price.ljust(20) + vegkeys[i.veggie]+"\n" - if i.desc : - r = r+"\t "+i.desc+"\n" - print(r) - - diff --git a/frontends/plain-text.yapsy-plugin b/frontends/plain-text.yapsy-plugin deleted file mode 100644 index 103cdc4..0000000 --- a/frontends/plain-text.yapsy-plugin +++ /dev/null @@ -1,3 +0,0 @@ -[Core] -Name = Plain Text Output -Module = plain-text
\ No newline at end of file |