Example #1
0
File: text.py Project: wojas/pomni
 def render_card_fields(self, fact, fields):
     txt = ''
     for field in fields:
         key = field[0]
         s = fact[key]
         for f in filters():
             s = f.run(s, fact)
         txt += s
     return txt
Example #2
0
 def render_card_fields(self, fact, fields):
     html = "<html><head>" + self.css(fact.card_type) + \
         "</head><body><table><tr><td>"
     for field in fields:
         key = field[0]
         s = fact[key]
         for f in filters():
             s = f.run(s, fact)
         html += "<div id=\"%s\">%s</div>" % (key, s)
     html += "</td></tr></table></body></html>"
     return html