feat: add version column to top plugins stats and optimize workflow

This commit is contained in:
fujie
2026-01-12 01:57:15 +08:00
parent afd1e7a444
commit 8511b7df80
2 changed files with 6 additions and 34 deletions

View File

@@ -415,7 +415,7 @@ class OpenWebUIStats:
"header": "| 📝 发布 | ⬇️ 下载 | 👁️ 浏览 | 👍 点赞 | 💾 收藏 |",
"top6_title": "### 🔥 热门插件 Top 6",
"top6_updated": f"> 🕐 自动更新于 {get_beijing_time().strftime('%Y-%m-%d %H:%M')}",
"top6_header": "| 排名 | 插件 | 下载 | 浏览 | 更新日期 |",
"top6_header": "| 排名 | 插件 | 版本 | 下载 | 浏览 | 更新日期 |",
"full_stats": "*完整统计请查看 [社区统计报告](./docs/community-stats.zh.md)*",
},
"en": {
@@ -425,7 +425,7 @@ class OpenWebUIStats:
"header": "| 📝 Posts | ⬇️ Downloads | 👁️ Views | 👍 Upvotes | 💾 Saves |",
"top6_title": "### 🔥 Top 6 Popular Plugins",
"top6_updated": f"> 🕐 Auto-updated: {get_beijing_time().strftime('%Y-%m-%d %H:%M')}",
"top6_header": "| Rank | Plugin | Downloads | Views | Updated |",
"top6_header": "| Rank | Plugin | Version | Downloads | Views | Updated |",
"full_stats": "*See full stats in [Community Stats Report](./docs/community-stats.md)*",
},
}
@@ -467,13 +467,13 @@ class OpenWebUIStats:
lines.append(t["top6_updated"])
lines.append("")
lines.append(t["top6_header"])
lines.append("|:---:|------|:---:|:---:|:---:|")
lines.append("|:---:|------|:---:|:---:|:---:|:---:|")
medals = ["🥇", "🥈", "🥉", "4", "5", "6"]
for i, post in enumerate(top_plugins):
medal = medals[i] if i < len(medals) else str(i + 1)
lines.append(
f"| {medal} | [{post['title']}]({post['url']}) | {post['downloads']} | {post['views']} | {post['updated_at']} |"
f"| {medal} | [{post['title']}]({post['url']}) | {post['version']} | {post['downloads']} | {post['views']} | {post['updated_at']} |"
)
lines.append("")