make it easier for callers to add extra lines

This commit is contained in:
Damien Elmes 2011-04-19 09:50:42 +09:00
parent 466c14421b
commit 497c25daa4

View file

@ -55,8 +55,12 @@ class CardStats(object):
return self.txt
def addLine(self, k, v):
self.txt += "<tr><td align=right style='padding-right: 3px;'>"
self.txt += "<b>%s</b></td><td>%s</td></tr>" % (k, v)
self.txt += self.makeLine(k, v)
def makeLine(self, k, v):
txt = "<tr><td align=right style='padding-right: 3px;'>"
txt += "<b>%s</b></td><td>%s</td></tr>" % (k, v)
return txt
def date(self, tm):
return time.strftime("%Y-%m-%d", time.localtime(tm))