From 1a429309df21a793961ccf7b250815a591b570dc Mon Sep 17 00:00:00 2001 From: Adam Waldenberg Date: Tue, 16 Apr 2013 15:22:45 +0200 Subject: [PATCH] Added HTML output to the responsibilities module. --- responsibilities.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/responsibilities.py b/responsibilities.py index 36bfea6..e9fc012 100644 --- a/responsibilities.py +++ b/responsibilities.py @@ -65,6 +65,23 @@ class ResponsibilitiesOutput(Outputable): if j >= 9: break + def output_html(self): + resp_xml = "
" + resp_xml += "

" + __responsibilities_info_text__ + ".

" + + for i in sorted(set(i[0] for i in blame.get(self.hard).blames)): + resp_xml += "

" + i + "is mostly responsible for

" + responsibilities = sorted(((i[1], i[0]) for i in Responsibilities.get(self.hard, i)), reverse=True) + + for j, entry in enumerate(responsibilities): + resp_xml += "

" + entry[1] + " (" + str(entry[0]) + " eloc)

" + + if j >= 9: + break + + resp_xml += "
" + print(resp_xml) + def output_xml(self): message_xml = "\t\t" + __responsibilities_info_text__ + "\n" resp_xml = ""