Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
Added language totaling code
Browse files Browse the repository at this point in the history
  • Loading branch information
jrg94 committed Aug 12, 2018
1 parent d959cdf commit d9b198d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions generate_wiki/generate_wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,14 @@ def build_alphabet_page(self, letter):
page.add_section_break()
page.add_table_header("Language", "Article(s)", "Issue(s)", "# of Snippets")
languages_by_letter = self.repo.get_languages_by_letter(letter)
total_snippets = 0
for language in languages_by_letter:
total_snippets += language.total_snippets
language_link = self.build_repo_link(language.name.capitalize(), letter, language.name)
tag_link = self.build_tag_link(language.name)
issues_link = self.build_issue_link(language.name)
page.add_table_row(language_link, tag_link, issues_link, str(language.total_snippets))
page.add_table_row("**Totals**", "", "", str(total_snippets))
page.add_section_break()
return page

Expand Down

0 comments on commit d9b198d

Please sign in to comment.