Repository navigation
feat(plugin): qq-image-notify 通知渲染成 macOS 风格卡片图片推送 QQ - #24
Merged
Merged
Conversation
新增 qq-image-notify 插件:Miotify 收到通知后渲染成精致卡片图片,
通过 QQ 官方 Bot API 以富媒体消息(msg_type=7)发送。
链路:通知 → HTML/CSS 模板 → Chromium 无头截图 PNG → 上传 QQ 官方
(file_type=1 图片)→ 富媒体消息发送
功能:
- macOS 磨砂玻璃风格卡片(深色渐变 + 主题色光晕 + 毛玻璃内容区)
- 按应用名自动匹配主题色(崩铁/原神/服务器/邮件/emby/默认)
- 优先级色条(消息=蓝 / 提醒=黄 / 警告=橙 / 严重=红)
- 内容超长自动截断(默认 10 行 + 提示)
- 复用 qq-direct-notify 基础设施:token 缓存、msg_seq、被动消息免额度
- 渲染失败自动降级为文本消息
- 失败重试(指数退避)、临时文件自动清理
依赖:playwright-core(复用系统 Chromium,无需下载浏览器)
踩坑记录:
- Linux Chromium 字体栈不能放 -apple-system/SF Pro Text(破坏字体回退,
数字/ASCII 字符渲染成空白),改用 Noto Sans CJK SC
- Chromium 路径可用 QQ_CARD_CHROMIUM 环境变量覆盖
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增 qq-image-notify 插件:Miotify 收到通知后渲染成精致卡片图片,
通过 QQ 官方 Bot API 以富媒体消息(msg_type=7)发送。
链路:通知 → HTML/CSS 模板 → Chromium 无头截图 PNG → 上传 QQ 官方
(file_type=1 图片)→ 富媒体消息发送
功能:
依赖:playwright-core(复用系统 Chromium,无需下载浏览器)
踩坑记录: