diff --git a/generate_build_details.py b/generate_build_details.py index 075cc7c08..612534f28 100644 --- a/generate_build_details.py +++ b/generate_build_details.py @@ -8,6 +8,7 @@ from sys import argv import dacite +import humanize from git import Repo from jinja2 import Environment, FileSystemLoader from urllib3 import request @@ -57,6 +58,7 @@ def get_language_repo_and_completion( logging.basicConfig(level=logging.INFO) logger.info('starting at %s', generation_time) env = Environment(loader=FileSystemLoader('templates')) + env.filters['naturaltime'] = humanize.naturaltime if (index_path := Path('build/index.json')).exists(): index_json = loads(Path('build/index.json').read_text()) else: diff --git a/requirements.txt b/requirements.txt index c704f04bd..d8ddda0e5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ gitpython urllib3 potodo jinja2 +humanize docutils git+https://github.com/m-aciek/sphinx.git@copilot/fix-last-four-cases-issue-14162 python-docs-theme diff --git a/templates/build-details.html.jinja b/templates/build-details.html.jinja index 73bd73f5c..25fe03e6a 100644 --- a/templates/build-details.html.jinja +++ b/templates/build-details.html.jinja @@ -24,7 +24,12 @@