Fixed the XML output of the timeline.
The output was simply wrong and was outputting extra "<authors>" tags all over the place. Also, whenever there was very little work, this was not included in the timeline.
This commit is contained in:
parent
0baa250db2
commit
2dd4c2c4ff
|
@ -200,20 +200,21 @@ class Timeline(Outputable):
|
||||||
|
|
||||||
for period in periods:
|
for period in periods:
|
||||||
name_xml = "\t\t\t\t<name>" + str(period) + "</name>\n"
|
name_xml = "\t\t\t\t<name>" + str(period) + "</name>\n"
|
||||||
authors_xml = ""
|
authors_xml = "\t\t\t\t<authors>\n"
|
||||||
|
|
||||||
for name in names:
|
for name in names:
|
||||||
authors_xml += "\t\t\t\t<authors>\n"
|
if timeline_data.is_author_in_period(period, name):
|
||||||
multiplier = timeline_data.get_multiplier(period, 24)
|
multiplier = timeline_data.get_multiplier(period, 24)
|
||||||
signs = timeline_data.get_author_signs_in_period(name, period, multiplier)
|
signs = timeline_data.get_author_signs_in_period(name, period, multiplier)
|
||||||
signs_str = (signs[1] * "-" + signs[0] * "+")
|
signs_str = (signs[1] * "-" + signs[0] * "+")
|
||||||
|
|
||||||
if not len(signs_str) == 0:
|
if len(signs_str) == 0:
|
||||||
|
signs_str = "."
|
||||||
|
|
||||||
authors_xml += "\t\t\t\t\t<author>\n\t\t\t\t\t\t<name>" + name + "</name>\n"
|
authors_xml += "\t\t\t\t\t<author>\n\t\t\t\t\t\t<name>" + name + "</name>\n"
|
||||||
authors_xml += "\t\t\t\t\t\t<work>" + signs_str + "</work>\n\t\t\t\t\t</author>\n"
|
authors_xml += "\t\t\t\t\t\t<work>" + signs_str + "</work>\n\t\t\t\t\t</author>\n"
|
||||||
|
|
||||||
authors_xml += "\t\t\t\t</authors>\n"
|
authors_xml += "\t\t\t\t</authors>\n"
|
||||||
|
|
||||||
modified_rows_xml = "\t\t\t\t<modified_rows>" + \
|
modified_rows_xml = "\t\t\t\t<modified_rows>" + \
|
||||||
str(timeline_data.get_total_changes_in_period(period)[2]) + "</modified_rows>\n"
|
str(timeline_data.get_total_changes_in_period(period)[2]) + "</modified_rows>\n"
|
||||||
timeline_xml += "\t\t\t<period>\n" + name_xml + authors_xml + modified_rows_xml + "\t\t\t</period>\n"
|
timeline_xml += "\t\t\t<period>\n" + name_xml + authors_xml + modified_rows_xml + "\t\t\t</period>\n"
|
||||||
|
|
Loading…
Reference in New Issue