diff --git a/src/build.py b/src/build.py index 5f4520b..ca41c0b 100644 --- a/src/build.py +++ b/src/build.py @@ -188,9 +188,20 @@ def build_statistics_page(page, articles): content += "\n" # Total word count + all_articles = [] + for article in articles: + all_articles.append(article) + all_articles.extend(article.addendums) + turn_numbers = set([a.turn for a in articles if a.player is not None]) + aggregate = {num: 0 for num in turn_numbers} + for turn_num in turn_numbers: + for article in all_articles: + if article.turn <= turn_num: + aggregate[turn_num] += article_length[article.title] + aggr_list = [(str(k), [str(v)]) for k,v in aggregate.items()] content += "