auto-sync: 2026-05-01 13:05:58
This commit is contained in:
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
const inboxDir = path.join(__dirname, 'mail/sanguo-quant/inboxes/pangtong');
|
|
||||||
const aggregatedFile = path.join(__dirname, 'mail/sanguo-quant/inboxes/pangtong.json');
|
|
||||||
|
|
||||||
// 读取聚合文件
|
|
||||||
const content = fs.readFileSync(aggregatedFile, 'utf-8');
|
|
||||||
const messages = JSON.parse(content);
|
|
||||||
|
|
||||||
// 确保目录存在
|
|
||||||
if (!fs.existsSync(inboxDir)) {
|
|
||||||
fs.mkdirSync(inboxDir, { recursive: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
// 将每个未读消息保存为单独文件
|
|
||||||
let count = 0;
|
|
||||||
messages.forEach((msg, index) => {
|
|
||||||
// 如果没有 isRead 字段,根据 read 字段转换
|
|
||||||
if (typeof msg.isRead === 'undefined') {
|
|
||||||
msg.isRead = msg.read || false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分配一个唯一 ID
|
|
||||||
const msgId = `jiangwei-reply-${Date.now()}-${index}`;
|
|
||||||
const filename = path.join(inboxDir, `${msgId}.json`);
|
|
||||||
|
|
||||||
// 保存单独文件
|
|
||||||
fs.writeFileSync(filename, JSON.stringify(msg, null, 2));
|
|
||||||
if (!msg.isRead) {
|
|
||||||
count++;
|
|
||||||
console.log(`✅ 已提取未读消息: ${filename}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(`\n🎉 提取完成!共提取 ${count} 个未读消息到正确目录: ${inboxDir}`);
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
const inboxDir = path.join(__dirname, 'mail/sanguo-quant/inboxes/pangtong');
|
|
||||||
const files = fs.readdirSync(inboxDir);
|
|
||||||
|
|
||||||
let count = 0;
|
|
||||||
files.forEach(file => {
|
|
||||||
if (!file.endsWith('.json')) return;
|
|
||||||
const filePath = path.join(inboxDir, file);
|
|
||||||
const content = fs.readFileSync(filePath, 'utf-8');
|
|
||||||
const msg = JSON.parse(content);
|
|
||||||
if (!msg.isRead) {
|
|
||||||
msg.isRead = true;
|
|
||||||
fs.writeFileSync(filePath, JSON.stringify(msg, null, 2));
|
|
||||||
count++;
|
|
||||||
console.log(`Marked as read: ${file}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(`\nDone! Marked ${count} messages as read.`);
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
vnpy>=4.0.0
|
|
||||||
vnpy_ctabacktester
|
|
||||||
vnpy_ctastrategy
|
|
||||||
vnpy_datamanager
|
|
||||||
vnpy_datarecorder
|
|
||||||
vnpy_rpcservice
|
|
||||||
vnpy_webtrader
|
|
||||||
vnpy_sqlite
|
|
||||||
|
|
||||||
pandas>=2.0.0
|
|
||||||
numpy>=1.24.0
|
|
||||||
scipy>=1.10.0
|
|
||||||
|
|
||||||
matplotlib>=3.7.0
|
|
||||||
seaborn>=0.12.0
|
|
||||||
plotly>=5.14.0
|
|
||||||
|
|
||||||
scikit-learn>=1.3.0
|
|
||||||
lightgbm>=4.0.0
|
|
||||||
xgboost>=2.0.0
|
|
||||||
|
|
||||||
TA-Lib>=0.4.28
|
|
||||||
|
|
||||||
python-dotenv>=1.0.0
|
|
||||||
requests>=2.31.0
|
|
||||||
aiohttp>=3.8.0
|
|
||||||
websockets>=11.0.0
|
|
||||||
pytest>=7.4.0
|
|
||||||
Reference in New Issue
Block a user