From 0d451ae29b5379296401ddabe053ee917692762d Mon Sep 17 00:00:00 2001 From: digua Date: Sun, 21 Dec 2025 22:45:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=9E=84=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main/parser/formats/index.ts | 6 +++--- ...akami-qq-exporter-v4.ts => shuakami-qq-exporter.ts} | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) rename electron/main/parser/formats/{shuakami-qq-exporter-v4.ts => shuakami-qq-exporter.ts} (98%) diff --git a/electron/main/parser/formats/index.ts b/electron/main/parser/formats/index.ts index 524e54fd..e4d6f531 100644 --- a/electron/main/parser/formats/index.ts +++ b/electron/main/parser/formats/index.ts @@ -8,7 +8,7 @@ import type { FormatModule } from '../types' // 导入所有格式模块 import chatlab from './chatlab' import chatlabJsonl from './chatlab-jsonl' -import shuakamiQqExporterV4 from './shuakami-qq-exporter-v4' +import shuakamiQqExporter from './shuakami-qq-exporter' import yccccccyEchotrace from './ycccccccy-echotrace' import wechatDefault from './wechat-default' import qqNativeTxt from './qq-native-txt' @@ -19,11 +19,11 @@ import qqNativeTxt from './qq-native-txt' export const formats: FormatModule[] = [ chatlab, // 优先级 1 - ChatLab JSON chatlabJsonl, // 优先级 2 - ChatLab JSONL(流式格式,支持超大文件) - shuakamiQqExporterV4, // 优先级 10 - shuakami/qq-chat-exporter V4 + shuakamiQqExporter, // 优先级 10 - shuakami/qq-chat-exporter yccccccyEchotrace, // 优先级 15 - ycccccccy/echotrace 微信导出 wechatDefault, // 优先级 20 - 微信数据库导出 JSON qqNativeTxt, // 优先级 30 - QQ 官方导出 TXT ] // 按名称导出,方便单独使用 -export { chatlab, chatlabJsonl, shuakamiQqExporterV4, yccccccyEchotrace, wechatDefault, qqNativeTxt } +export { chatlab, chatlabJsonl, shuakamiQqExporter, yccccccyEchotrace, wechatDefault, qqNativeTxt } diff --git a/electron/main/parser/formats/shuakami-qq-exporter-v4.ts b/electron/main/parser/formats/shuakami-qq-exporter.ts similarity index 98% rename from electron/main/parser/formats/shuakami-qq-exporter-v4.ts rename to electron/main/parser/formats/shuakami-qq-exporter.ts index bcef64bd..24f84909 100644 --- a/electron/main/parser/formats/shuakami-qq-exporter-v4.ts +++ b/electron/main/parser/formats/shuakami-qq-exporter.ts @@ -1,7 +1,7 @@ /** - * shuakami/qq-chat-exporter V4 格式解析器 + * shuakami/qq-chat-exporter 格式解析器 * 适配项目: https://github.com/shuakami/qq-chat-exporter - * 版本: V4.x (2025年12月更新) + * 版本: 通用(支持 V4.x 及后续版本) * * 文件结构: * - metadata: 元数据 @@ -39,13 +39,13 @@ import { getFileSize, createProgress, readFileHeadBytes, parseTimestamp, isValid // ==================== 特征定义 ==================== export const feature: FormatFeature = { - id: 'shuakami-qq-exporter-v4', - name: 'shuakami/qq-chat-exporter V4', + id: 'shuakami-qq-exporter', + name: 'shuakami/qq-chat-exporter', platform: KNOWN_PLATFORMS.QQ, priority: 10, extensions: ['.json'], signatures: { - head: [/QQChatExporter V4/, /"version"\s*:\s*"4\./], + head: [/QQChatExporter(?:\s+V\d+)?/, /"version"\s*:\s*"\d+\./], requiredFields: ['metadata', 'chatInfo'], }, }