diff --git a/html/html.header b/html/html.header index d2bba87..32ad00b 100644 --- a/html/html.header +++ b/html/html.header @@ -45,6 +45,9 @@ font-size: small; width: 60%; }} + table.full {{ + width: 100%; + }} table.git th, table.git tfoot tr td {{ padding: 0.3em; background-color: #ddcece; @@ -57,6 +60,17 @@ }} table.git td {{ padding: 0.4em; + height: 1em; + }} + table.git td div.insert {{ + background-color: #7a7; + }} + table.git td div.remove {{ + background-color: #c66; + }} + table.git td div.insert, table.git td div.remove {{ + height: 100%; + float: left; }} table.git tr.odd {{ background-color: #dbdbdb; diff --git a/timeline.py b/timeline.py index 8906cd1..7566b84 100644 --- a/timeline.py +++ b/timeline.py @@ -123,6 +123,35 @@ def __output_row__text__(timeline_data, periods, names): print("") +def __output_row__html__(timeline_data, periods, names): + timeline_xml = "
Author | " + + for period in periods: + timeline_xml += "" + str(period) + " | " + + timeline_xml += "
---|---|
" + name + " | " + for period in periods: + multiplier = timeline_data.get_multiplier(period, 14) + signs = timeline_data.get_author_signs_in_period(name, period, multiplier) + signs_str = (signs[1] * "" + ("." if timeline_data.is_author_in_period(period, name) and len(signs_str) == 0 else signs_str) + timeline_xml += " | " + timeline_xml += "
Modified Rows: | " + + for period in periods: + total_changes = timeline_data.get_total_changes_in_period(period) + timeline_xml += "" + str(total_changes[2]) + " | " + + timeline_xml += "
" + __timeline_info_text__ + ".
" + print(timeline_xml) + + for i in range(0, len(periods), max_periods_per_row): + __output_row__html__(timeline_data, periods[i:i+max_periods_per_row], names) + + timeline_xml = "