diff --git a/CHANGELOG.md b/CHANGELOG.md index 652971d..2d4827e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # 更新日志 (CHANGELOG) +## [v4.11.2] - 🛠️ 定时报告可同时发送多种格式,可关闭报告发送时的 “📊 每日群聊分析报告已生成” 文字前缀 + +--- + +
+📋 点击查看历史更新日志 + + ## [v4.11.1] - 🛠️ 修复 QQ 官方机器人昵称与提及清洗 * **🛠️ 成员昵称恢复**: QQ 官方群消息会保存并在图片、HTML 报告中展示事件提供的成员昵称;昵称缺失或旧历史记录仅保存 OpenID 时,使用群内稳定匿名名,避免直接展示 `member_openid`。 @@ -17,11 +25,6 @@ * **✨ Markdown 报告**: QQ 官方文本报告使用自定义 Markdown,并默认通过 AstrBot T2I 生成透明背景的群聊概览图,将日期、基础统计和 24 小时竖向直方图合并为紧凑布局。可在 `QQ 官方机器人` 配置组关闭;渲染失败时自动回退为包含文字条形图的完整文本报告。 * **✨ Markdown 概览图**: Markdown 概览图直接使用 AstrBot T2I 返回的公网 URL。请确保当前 T2I 端点域名已加入 QQ 开放平台的消息 URL 配置。 ---- - -
-📋 点击查看历史更新日志 - ## [v4.10.9] - ✨ 新增模板 ”BlueArchive“ 蔚蓝档案 (@VanillaNahida) ## [v4.10.8] - 🛠️ snowluma 被禁言避免触发分析修复 (#191) diff --git a/README.md b/README.md index 84bc863..4180cc0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # 群聊日常分析插件 -[![Plugin Version](https://img.shields.io/badge/Latest_Version-v4.11.1-blue.svg?style=for-the-badge&color=76bad9)](https://github.com/SXP-Simon/astrbot-qq-group-daily-analysis) +[![Plugin Version](https://img.shields.io/badge/Latest_Version-v4.11.2-blue.svg?style=for-the-badge&color=76bad9)](https://github.com/SXP-Simon/astrbot-qq-group-daily-analysis) [![AstrBot](https://img.shields.io/badge/AstrBot-Plugin-ff69b4?style=for-the-badge)](https://github.com/AstrBotDevs/AstrBot) [![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](LICENSE) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/SXP-Simon/astrbot_plugin_qq_group_daily_analysis) diff --git a/_conf_schema.json b/_conf_schema.json index af4ff20..10f0bc0 100644 --- a/_conf_schema.json +++ b/_conf_schema.json @@ -72,7 +72,7 @@ "html" ], "default": ["image"], - "hint": "选择分析报告的输出方式(可多选)。image=图片、text=纯文本摘要、html=可交互式网页文件。多选时报告按顺序依次发送,例如 image+html 会发送图片并通过外链提供 HTML 报告。QQ 官方图片/HTML 报告优先显示事件昵称,昵称缺失时使用群内稳定匿名名;文本报告由独立 Markdown 模块使用成员艾特展示身份。其他平台保持原有昵称文本格式。" + "hint": "选择分析报告的输出方式(可多选)。image=图片、text=纯文本摘要、html=可交互式网页文件。多选仅在定时分析发送时时报告按顺序依次发送,手动触发时只发送第一个选中的格式,例如 image+html 会发送图片并通过外链提供 HTML 报告。QQ 官方图片/HTML 报告优先显示事件昵称,昵称缺失时使用群内稳定匿名名;文本报告由独立 Markdown 模块使用成员艾特展示身份。其他平台保持原有昵称文本格式。" }, "report_template": { "type": "string", diff --git a/main.py b/main.py index fe83af2..3704c30 100644 --- a/main.py +++ b/main.py @@ -649,7 +649,11 @@ class GroupDailyAnalysis(Star): ) if image_url: - caption = TraceContext.make_report_caption() if self.config_manager.get_show_report_caption() else "" + caption = ( + TraceContext.make_report_caption() + if self.config_manager.get_show_report_caption() + else "" + ) sent = await adapter.send_image(group_id, image_url, caption=caption) if sent: await self._try_upload_image(group_id, image_url, platform_id) diff --git a/metadata.yaml b/metadata.yaml index 8d97f56..83b3812 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,7 +1,7 @@ name: astrbot_plugin_qq_group_daily_analysis # 这是你的插件的唯一识别名。 display_name: 群分析总结插件 # 插件的显示名称 desc: "群日常分析总结插件 - 支持 OneBot (NapCat, LLOneBot, Snowluma)、QQ 官方机器人、Telegram、Discord;生成精美的群聊分析报告,支持话题分析、用户形象、群聊圣经等功能" # 插件简短描述 -version: v4.11.1 # 插件版本号。格式:v1.1.1 或者 v1.1 +version: v4.11.2 # 插件版本号。格式:v1.1.1 或者 v1.1 author: SXP-Simon # 作者 astrbot_version: ">=4.16.0" support_platforms: diff --git a/src/infrastructure/config/config_manager.py b/src/infrastructure/config/config_manager.py index 9fe96da..1116197 100644 --- a/src/infrastructure/config/config_manager.py +++ b/src/infrastructure/config/config_manager.py @@ -498,7 +498,9 @@ class ConfigManager: def set_output_format(self, format_types: str | list[str]): """设置输出格式""" if isinstance(format_types, str): - format_types = [f.strip() for f in format_types.replace(",", ",").split(",")] + format_types = [ + f.strip() for f in format_types.replace(",", ",").split(",") + ] for f in format_types: if f not in ("image", "text", "html"): raise ValueError(f"无效格式: {f}。有效: image, text, html") diff --git a/src/infrastructure/reporting/dispatcher.py b/src/infrastructure/reporting/dispatcher.py index 556aaa1..ac1ae0d 100644 --- a/src/infrastructure/reporting/dispatcher.py +++ b/src/infrastructure/reporting/dispatcher.py @@ -100,7 +100,11 @@ class ReportDispatcher: # 4. 发送图片 sent = False if image_url: - caption = TraceContext.make_report_caption() if self.config_manager.get_show_report_caption() else "" + caption = ( + TraceContext.make_report_caption() + if self.config_manager.get_show_report_caption() + else "" + ) sent = await self.message_sender.send_image_smart( group_id, image_url, caption, platform_id ) @@ -180,7 +184,11 @@ class ReportDispatcher: f"[{trace_id}] 群 {group_id} 开启了仅发送外链,但未配置 html_base_url,已进行降级,回退至发送 HTML 文件。" ) - caption = self.report_generator.build_html_caption(html_path) if self.config_manager.get_show_report_caption() else "" + caption = ( + self.report_generator.build_html_caption(html_path) + if self.config_manager.get_show_report_caption() + else "" + ) sent = await self.message_sender.send_file( group_id,