mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +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 os
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
file_path = 'aider/website/docs/leaderboards/index.md'
|
files = [
|
||||||
mod_time = os.path.getmtime(file_path)
|
'aider/website/docs/leaderboards/index.md',
|
||||||
mod_date = datetime.datetime.fromtimestamp(mod_time)
|
'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.')}")
|
cog.out(f"{mod_date.strftime('%B %d, %Y.')}")
|
||||||
]]]-->
|
]]]-->
|
||||||
July 29, 2024.
|
July 29, 2024.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue