mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
chore: Remove last updated date cog code
This commit is contained in:
parent
0a5c1960b3
commit
d32d0b7909
1 changed files with 0 additions and 27 deletions
|
@ -254,30 +254,3 @@ You can add some introductory text for your blog post here.
|
|||
<script>
|
||||
{% include leaderboard_table.js %}
|
||||
</script>
|
||||
|
||||
<p class="post-date" style="margin-top: 20px;">
|
||||
By [Your Name],
|
||||
last updated
|
||||
<!--[[[cog
|
||||
import subprocess
|
||||
import datetime
|
||||
|
||||
# Adjust the file list to include your new data file and this post file
|
||||
files = [
|
||||
'aider/website/_post/2025-05-08-qwen3.md', # This post
|
||||
'aider/website/_data/qwen3_leaderboard.yml', # Your new data file
|
||||
]
|
||||
|
||||
def get_last_modified_date(file):
|
||||
result = subprocess.run(['git', 'log', '-1', '--format=%ct', file], capture_output=True, text=True)
|
||||
if result.returncode == 0:
|
||||
timestamp = int(result.stdout.strip())
|
||||
return datetime.datetime.fromtimestamp(timestamp)
|
||||
return datetime.datetime.min
|
||||
|
||||
mod_dates = [get_last_modified_date(file) for file in files]
|
||||
latest_mod_date = max(mod_dates)
|
||||
cog.out(f"{latest_mod_date.strftime('%B %d, %Y.')}")
|
||||
]]]-->
|
||||
<!--[[[end]]]-->
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue