mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
Update the modification date in the leaderboard index page based on the latest modification time of the related files
This commit is contained in:
parent
2ec8099319
commit
a67da8a133
1 changed files with 9 additions and 3 deletions
|
@ -11,9 +11,15 @@ last updated
|
|||
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)
|
||||
files = [
|
||||
'aider/website/docs/leaderboards/index.md',
|
||||
'aider/website/_data/edit_leaderboard.yml',
|
||||
'aider/website/_data/refactor_leaderboard.yml'
|
||||
]
|
||||
|
||||
mod_times = [os.path.getmtime(file) for file in files]
|
||||
latest_mod_time = max(mod_times)
|
||||
mod_date = datetime.datetime.fromtimestamp(latest_mod_time)
|
||||
cog.out(f"{mod_date.strftime('%B %d, %Y.')}")
|
||||
]]]-->
|
||||
July 29, 2024.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue