mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
Added HTML output to the metrics module.
This commit is contained in:
parent
f106ad85ca
commit
4f66b46c67
1 changed files with 14 additions and 0 deletions
14
metrics.py
14
metrics.py
|
@ -75,6 +75,20 @@ class Metrics(Outputable):
|
||||||
for i in sorted(set([(j, i) for (i, j) in metrics_logic.eloc.items()]), reverse = True):
|
for i in sorted(set([(j, i) for (i, j) in metrics_logic.eloc.items()]), reverse = True):
|
||||||
print(i[1] + " (" + str(i[0]) + " eloc)")
|
print(i[1] + " (" + str(i[0]) + " eloc)")
|
||||||
|
|
||||||
|
def output_html(self):
|
||||||
|
metrics_logic = MetricsLogic()
|
||||||
|
metrics_xml = "<div><div class=\"box\">"
|
||||||
|
|
||||||
|
if not metrics_logic.eloc:
|
||||||
|
metrics_xml += "<p>" + __metrics_missing_info_text__ + ".</p>"
|
||||||
|
else:
|
||||||
|
metrics_xml += "<p>" + __eloc_info_text__ + ".</p>"
|
||||||
|
for i in sorted(set([(j, i) for (i, j) in metrics_logic.eloc.items()]), reverse = True):
|
||||||
|
metrics_xml += "<p>" + i[1] + " (" + str(i[0]) + " eloc)</p>"
|
||||||
|
|
||||||
|
metrics_xml += "</div></div>"
|
||||||
|
print(metrics_xml)
|
||||||
|
|
||||||
def output_xml(self):
|
def output_xml(self):
|
||||||
metrics_logic = MetricsLogic()
|
metrics_logic = MetricsLogic()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue