Add Python code to print the last modified date of the leaderboards index.md file

This commit is contained in:
Paul Gauthier (aider) 2024-07-29 13:09:32 -03:00
parent 9791ab7bdc
commit 7d04fc2183

View file

@ -6,10 +6,14 @@ description: Quantitative benchmarks of LLM code editing skill.
<p class="post-date">
<!--[[[cog
# TODO: write python code in here to print out the last modified date
of aider/webside/docs/leaderboard.md in the format below ending with ","
import os
import datetime
file_path = 'aider/website/docs/leaderboards/index.md'
mod_time = os.path.getmtime(file_path)
mod_date = datetime.datetime.fromtimestamp(mod_time)
print(f"{mod_date.strftime('%B %d, %Y')},")
]]]-->
{{ page.date | date: "%B %d, %Y" }},
<!--[[[end]]]-->
by Paul Gauthier
</p>