AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning

This commit is contained in:
Krilly
2026-03-04 13:29:22 +00:00
parent 29a98137a7
commit 57dd294675
13706 changed files with 2114953 additions and 237629 deletions

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env node
const { sendCard } = require('./feishu-helper.js');
// CLI Arguments:
// 1. Message content
// 2. Prefix (e.g., "[INFO]")
const msg = process.argv[2];
const prefix = process.argv[3] || '[INFO]';
const target = process.env.FEISHU_LOG_TARGET || process.env.LOG_TARGET || '';
if (!target) { process.stderr.write('[CardFail] FEISHU_LOG_TARGET or LOG_TARGET env var not set\n'); process.exit(1); }
if (!msg) process.exit(0);
(async () => {
try {
const color = prefix.includes('ERROR') || prefix.includes('CRITICAL') || prefix.includes('FAILURE')
? 'red'
: prefix.includes('WARNING') || prefix.includes('WARN')
? 'orange'
: 'blue';
await sendCard({
target,
title: `🧬 Evolver [${new Date().toISOString().substring(11,19)}]`,
text: `${prefix} ${msg}`,
color
});
} catch (e) {
process.stderr.write(`[CardFail] ${e.message}\n`);
process.exit(1);
}
})();