diff --git a/generate.py b/generate.py index 611914034..1d7493d85 100644 --- a/generate.py +++ b/generate.py @@ -25,6 +25,7 @@ import contribute from completion import branches_from_devguide, get_completion, TranslatorsData from repositories import Language, get_languages_and_repos +from word_count import get_word_count generation_time = datetime.now(timezone.utc) @@ -107,6 +108,7 @@ class LanguageProjectData: completion_progress=(completion_progress := list(get_completion_progress())), generation_time=generation_time, duration=(datetime.now(timezone.utc) - generation_time).seconds, + word_count=get_word_count(Path('clones', 'cpython', 'Doc', 'build', 'gettext')), ) Path('index.html').write_text(output) diff --git a/template.html.jinja b/template.html.jinja index 252e07d32..fc37ab1e4 100644 --- a/template.html.jinja +++ b/template.html.jinja @@ -53,6 +53,7 @@ main | meta
* the number in parentheses shows change in the last 30 days, included in the total completion
+The Python documentation currently has a word count of {{ '{:,}'.format(word_count) }}.
For more information about translations, see the Python Developer’s Guide.
Last updated at {{ generation_time.strftime('%A, %-d %B %Y, %-H:%M:%S %Z') }} (in {{ duration // 60 }}:{{ "{:02}".format(duration % 60) }} minutes).