✨ 添加作者统计信息
- README 统计区域新增作者信息:粉丝数、积分、贡献数 - 中英文版本分别使用对应语言的表头 - 从 API 返回的 user 对象中提取用户统计数据
This commit is contained in:
@@ -9,9 +9,13 @@ A collection of enhancements, plugins, and prompts for [OpenWebUI](https://githu
|
||||
|
||||
> 🕐 Auto-updated on 2026-01-06
|
||||
|
||||
| 👤 Author | 👥 Followers | ⭐ Points | 🏆 Contributions |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **32** | **63** | **17** |
|
||||
|
||||
| 📝 Posts | ⬇️ Downloads | 👁️ Views | 👍 Upvotes | 💾 Saves |
|
||||
|:---:|:---:|:---:|:---:|:---:|
|
||||
| **11** | **731** | **7648** | **54** | **43** |
|
||||
| **11** | **731** | **7652** | **54** | **43** |
|
||||
|
||||
### 🔥 Top 5 Popular Plugins
|
||||
|
||||
|
||||
@@ -9,9 +9,13 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
|
||||
|
||||
> 🕐 自动更新于 2026-01-06
|
||||
|
||||
| 👤 作者 | 👥 粉丝 | ⭐ 积分 | 🏆 贡献 |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **32** | **63** | **17** |
|
||||
|
||||
| 📝 发布 | ⬇️ 下载 | 👁️ 浏览 | 👍 点赞 | 💾 收藏 |
|
||||
|:---:|:---:|:---:|:---:|:---:|
|
||||
| **11** | **731** | **7648** | **54** | **43** |
|
||||
| **11** | **731** | **7652** | **54** | **43** |
|
||||
|
||||
### 🔥 热门插件 Top 5
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"total_posts": 11,
|
||||
"total_downloads": 731,
|
||||
"total_views": 7648,
|
||||
"total_views": 7652,
|
||||
"total_upvotes": 54,
|
||||
"total_downvotes": 0,
|
||||
"total_saves": 43,
|
||||
@@ -114,7 +114,7 @@
|
||||
"type": "unknown",
|
||||
"version": "",
|
||||
"downloads": 13,
|
||||
"views": 514,
|
||||
"views": 518,
|
||||
"upvotes": 7,
|
||||
"saves": 1,
|
||||
"comments": 1,
|
||||
@@ -164,5 +164,17 @@
|
||||
"updated_at": "2025-12-31",
|
||||
"url": "https://openwebui.com/posts/异步上下文压缩_5c0617cb"
|
||||
}
|
||||
]
|
||||
],
|
||||
"user": {
|
||||
"username": "Fu-Jie",
|
||||
"name": "Fu-Jie",
|
||||
"profile_url": "https://openwebui.com/u/Fu-Jie",
|
||||
"profile_image": "https://community.s3.openwebui.com/uploads/users/b15d1348-4347-42b4-b815-e053342d6cb0/profile_d9510745-4bd4-4f8f-a997-4a21847d9300.webp",
|
||||
"followers": 32,
|
||||
"following": 2,
|
||||
"total_points": 63,
|
||||
"post_points": 54,
|
||||
"comment_points": 9,
|
||||
"contributions": 17
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# 📊 OpenWebUI 社区统计报告
|
||||
|
||||
> 📅 更新时间: 2026-01-06 01:47:55
|
||||
> 📅 更新时间: 2026-01-06 01:52:44
|
||||
|
||||
## 📈 总览
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|------|------|
|
||||
| 📝 发布数量 | 11 |
|
||||
| ⬇️ 总下载量 | 731 |
|
||||
| 👁️ 总浏览量 | 7648 |
|
||||
| 👁️ 总浏览量 | 7652 |
|
||||
| 👍 总点赞数 | 54 |
|
||||
| 💾 总收藏数 | 43 |
|
||||
| 💬 总评论数 | 13 |
|
||||
@@ -28,7 +28,7 @@
|
||||
| 5 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | unknown | | 62 | 850 | 6 | 7 | 2026-01-04 |
|
||||
| 6 | [Export to Word (Enhanced Formatting)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | unknown | | 38 | 422 | 5 | 2 | 2026-01-05 |
|
||||
| 7 | [智能信息图](https://openwebui.com/posts/智能信息图_e04a48ff) | unknown | | 31 | 372 | 3 | 0 | 2025-12-29 |
|
||||
| 8 | [导出为 Word-支持公式、流程图、表格和代码块](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | unknown | | 13 | 514 | 7 | 1 | 2026-01-05 |
|
||||
| 8 | [导出为 Word-支持公式、流程图、表格和代码块](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | unknown | | 13 | 518 | 7 | 1 | 2026-01-05 |
|
||||
| 9 | [闪记卡生成插件](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | unknown | | 12 | 305 | 3 | 1 | 2026-01-01 |
|
||||
| 10 | [智能生成交互式思维导图,帮助用户可视化知识](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | unknown | | 10 | 233 | 2 | 0 | 2025-12-31 |
|
||||
| 11 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | unknown | | 5 | 104 | 2 | 1 | 2025-12-31 |
|
||||
|
||||
@@ -119,8 +119,25 @@ class OpenWebUIStats:
|
||||
"total_comments": 0,
|
||||
"by_type": {},
|
||||
"posts": [],
|
||||
"user": {}, # 用户信息
|
||||
}
|
||||
|
||||
# 从第一个帖子中提取用户信息
|
||||
if posts and "user" in posts[0]:
|
||||
user = posts[0]["user"]
|
||||
stats["user"] = {
|
||||
"username": user.get("username", ""),
|
||||
"name": user.get("name", ""),
|
||||
"profile_url": f"https://openwebui.com/u/{user.get('username', '')}",
|
||||
"profile_image": user.get("profileImageUrl", ""),
|
||||
"followers": user.get("followerCount", 0),
|
||||
"following": user.get("followingCount", 0),
|
||||
"total_points": user.get("totalPoints", 0),
|
||||
"post_points": user.get("postPoints", 0),
|
||||
"comment_points": user.get("commentPoints", 0),
|
||||
"contributions": user.get("totalContributions", 0),
|
||||
}
|
||||
|
||||
for post in posts:
|
||||
# 累计统计
|
||||
stats["total_downloads"] += post.get("downloads", 0)
|
||||
@@ -276,6 +293,7 @@ class OpenWebUIStats:
|
||||
"zh": {
|
||||
"title": "## 📊 社区统计",
|
||||
"updated": f"> 🕐 自动更新于 {datetime.now().strftime('%Y-%m-%d')}",
|
||||
"author_header": "| 👤 作者 | 👥 粉丝 | ⭐ 积分 | 🏆 贡献 |",
|
||||
"header": "| 📝 发布 | ⬇️ 下载 | 👁️ 浏览 | 👍 点赞 | 💾 收藏 |",
|
||||
"top5_title": "### 🔥 热门插件 Top 5",
|
||||
"top5_header": "| 排名 | 插件 | 下载 | 浏览 |",
|
||||
@@ -284,6 +302,7 @@ class OpenWebUIStats:
|
||||
"en": {
|
||||
"title": "## 📊 Community Stats",
|
||||
"updated": f"> 🕐 Auto-updated on {datetime.now().strftime('%Y-%m-%d')}",
|
||||
"author_header": "| 👤 Author | 👥 Followers | ⭐ Points | 🏆 Contributions |",
|
||||
"header": "| 📝 Posts | ⬇️ Downloads | 👁️ Views | 👍 Upvotes | 💾 Saves |",
|
||||
"top5_title": "### 🔥 Top 5 Popular Plugins",
|
||||
"top5_header": "| Rank | Plugin | Downloads | Views |",
|
||||
@@ -292,6 +311,7 @@ class OpenWebUIStats:
|
||||
}
|
||||
|
||||
t = texts.get(lang, texts["en"])
|
||||
user = stats.get("user", {})
|
||||
|
||||
lines = []
|
||||
lines.append("<!-- STATS_START -->")
|
||||
@@ -300,6 +320,18 @@ class OpenWebUIStats:
|
||||
lines.append(t["updated"])
|
||||
lines.append("")
|
||||
|
||||
# 作者信息表格
|
||||
if user:
|
||||
username = user.get("username", "")
|
||||
profile_url = user.get("profile_url", "")
|
||||
lines.append(t["author_header"])
|
||||
lines.append("|:---:|:---:|:---:|:---:|")
|
||||
lines.append(
|
||||
f"| [{username}]({profile_url}) | **{user.get('followers', 0)}** | "
|
||||
f"**{user.get('total_points', 0)}** | **{user.get('contributions', 0)}** |"
|
||||
)
|
||||
lines.append("")
|
||||
|
||||
# 统计徽章表格
|
||||
lines.append(t["header"])
|
||||
lines.append("|:---:|:---:|:---:|:---:|:---:|")
|
||||
|
||||
Reference in New Issue
Block a user