From dff78a21d10e2e22725b2d6310e0a4a3ee03a827 Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 19 May 2025 13:56:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/rssPush.js | 10 ++++++++++ constants/rss/rss_template.html | 21 +++++++++++++++++++-- lib/rss/screenshot.js | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/apps/rssPush.js b/apps/rssPush.js index 687dc60..baf4a22 100644 --- a/apps/rssPush.js +++ b/apps/rssPush.js @@ -5,6 +5,7 @@ import screenshot from '../lib/rss/screenshot.js'; import fs from 'fs'; import rssCache from '../lib/rss/rssCache.js'; import schedule from 'node-schedule'; +import tools from '../components/tool.js'; export default class RssPlugin extends plugin { constructor() { @@ -149,6 +150,15 @@ export default class RssPlugin extends plugin { const post = newItems[0]; const tempPath = path.join(process.cwd(), 'data', `rss-${Date.now()}.png`); if (feed.screenshot) { + await Bot.pickGroup(groupId)?.sendMsg( + `${configControl.get('nickName')}发现了一条新的rss推送!` + ); + await tools.sleep(1000); + //await Bot.pickGroup(groupId)?.sendMsg(`让${configControl.get('nickName')}看看内容是什么..`); + // TODO 通过人工智能查看内容 + await Bot.pickGroup(groupId)?.sendMsg( + `[标题] ${post.title}\n[作者] ${post.author}\n[来源} ${post.feedTitle}\n正在努力截图..` + ); await screenshot.generateScreenshot(post, tempPath); await Bot.pickGroup(groupId)?.sendMsg([segment.image(tempPath)]); fs.unlinkSync(tempPath); diff --git a/constants/rss/rss_template.html b/constants/rss/rss_template.html index 4f0f647..06bc17a 100644 --- a/constants/rss/rss_template.html +++ b/constants/rss/rss_template.html @@ -3,12 +3,14 @@ {{title}} + + +