From 75cc118d995b5a0aa84c7e8dfa4f4aad7c705654 Mon Sep 17 00:00:00 2001 From: shuaikangzhou <863909694@qq.com> Date: Fri, 9 Feb 2024 18:00:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=BE=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/decrypt/version_list.json | 14 ++++++++++++++ app/resources/data/version_list.json | 14 ++++++++++++++ app/ui/mainview.py | 6 ++++-- app/util/exporter/exporter_docx.py | 6 +++--- app/util/exporter/exporter_html.py | 18 +++++++++--------- app/util/exporter/output.py | 8 ++++---- 6 files changed, 48 insertions(+), 18 deletions(-) diff --git a/app/decrypt/version_list.json b/app/decrypt/version_list.json index cb1a151..d1387ca 100644 --- a/app/decrypt/version_list.json +++ b/app/decrypt/version_list.json @@ -586,5 +586,19 @@ 39016312, 0, 0 + ], + "3.0.0.0": [ + 25834908, + 25846332, + 25834960, + 0, + 0 + ], + "3.7.0.23": [ + 37105844, + 37106952, + 37105896, + 0, + 0 ] } \ No newline at end of file diff --git a/app/resources/data/version_list.json b/app/resources/data/version_list.json index cb1a151..d1387ca 100644 --- a/app/resources/data/version_list.json +++ b/app/resources/data/version_list.json @@ -586,5 +586,19 @@ 39016312, 0, 0 + ], + "3.0.0.0": [ + 25834908, + 25846332, + 25834960, + 0, + 0 + ], + "3.7.0.23": [ + 37105844, + 37106952, + 37105896, + 0, + 0 ] } \ No newline at end of file diff --git a/app/ui/mainview.py b/app/ui/mainview.py index fa763d6..43ceda5 100644 --- a/app/ui/mainview.py +++ b/app/ui/mainview.py @@ -19,8 +19,10 @@ from app.DataBase import misc_db, micro_msg_db, close_db from app.ui.Icon import Icon from . import mainwindow # 不能删,删了会出错 -from .chat import ChatWindow -from .contact import ContactWindow +from app.ui.chat import ChatWindow +from app.ui.contact import ContactWindow +from app.ui.tool.tool_window import ToolWindow +from app.ui.home.home_window import HomeWindow from .menu.export import ExportDialog from app.util.exporter.output import Output from ..components.QCursorGif import QCursorGif diff --git a/app/util/exporter/exporter_docx.py b/app/util/exporter/exporter_docx.py index 01f387e..fcdea40 100644 --- a/app/util/exporter/exporter_docx.py +++ b/app/util/exporter/exporter_docx.py @@ -239,7 +239,7 @@ class DocxExporter(ExporterBase): return content_cell def music_share(self, doc, message): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) is_send = message[4] timestamp = message[5] content = music_share(message[11]) @@ -255,7 +255,7 @@ class DocxExporter(ExporterBase): display_name = self.get_display_name(is_send, message) def share_card(self, doc, message): - origin_path = f"{os.path.abspath('../../DataBase')}/data/聊天记录/{self.contact.remark}" + origin_path = f"{os.getcwd()}/data/聊天记录/{self.contact.remark}" is_send = message[4] timestamp = message[5] bytesExtra = message[10] @@ -282,7 +282,7 @@ class DocxExporter(ExporterBase): app_logo = '' def merge_docx(self, conRemark, n): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录') + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录') all_file_path = [] for i in range(n): file_name = f"{conRemark}{i}.docx" diff --git a/app/util/exporter/exporter_html.py b/app/util/exporter/exporter_html.py index 16f4e67..5b55491 100644 --- a/app/util/exporter/exporter_html.py +++ b/app/util/exporter/exporter_html.py @@ -63,7 +63,7 @@ class HtmlExporter(ExporterBase): ) def audio(self, doc, message): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) str_content = message[7] str_time = message[8] is_send = message[4] @@ -99,7 +99,7 @@ class HtmlExporter(ExporterBase): ) def file(self, doc, message): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) bytesExtra = message[10] compress_content = message[11] str_time = message[8] @@ -170,7 +170,7 @@ class HtmlExporter(ExporterBase): ) def video(self, doc, message): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) type_ = message[2] str_content = message[7] str_time = message[8] @@ -211,7 +211,7 @@ class HtmlExporter(ExporterBase): ) def music_share(self, doc, message): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) is_send = message[4] timestamp = message[5] content = music_share(message[11]) @@ -232,7 +232,7 @@ class HtmlExporter(ExporterBase): ) def share_card(self, doc, message): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) is_send = message[4] timestamp = message[5] bytesExtra = message[10] @@ -379,7 +379,7 @@ class OutputMedia(QThread): self.contact = contact def run(self): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) messages = msg_db.get_messages_by_type(self.contact.wxid, 34) for message in messages: is_send = message[4] @@ -408,7 +408,7 @@ class OutputEmoji(QThread): self.contact = contact def run(self): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) messages = msg_db.get_messages_by_type(self.contact.wxid, 47) for message in messages: str_content = message[7] @@ -445,7 +445,7 @@ class OutputImage(QThread): print("图片导出完成") def run(self): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) messages = msg_db.get_messages_by_type(self.contact.wxid, 3) base_path = os.path.join(output_dir, '聊天记录', self.contact.remark, 'image') for message in messages: @@ -487,7 +487,7 @@ class OutputImageChild(QThread): self.messages = messages def run(self): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) for message in self.messages: str_content = message[7] BytesExtra = message[10] diff --git a/app/util/exporter/output.py b/app/util/exporter/output.py index 655b862..6ab6d15 100644 --- a/app/util/exporter/output.py +++ b/app/util/exporter/output.py @@ -81,7 +81,7 @@ class Output(QThread): @return: """ - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录') + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录') os.makedirs(origin_path, exist_ok=True) filename = QFileDialog.getSaveFileName(None, "save file", os.path.join(os.getcwd(), 'messages.csv'), "csv files (*.csv);;all files(*.*)") @@ -337,7 +337,7 @@ class OutputEmoji(QThread): self.time_range = time_range def run(self): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) messages = msg_db.get_messages_by_type(self.contact.wxid, 47, time_range=self.time_range) for message in messages: str_content = message[7] @@ -374,7 +374,7 @@ class OutputImage(QThread): print('图片导出完成') def run(self): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) messages = msg_db.get_messages_by_type(self.contact.wxid, 3, time_range=self.time_range) base_path = os.path.join(output_dir,'聊天记录',self.contact.remark,'image') for message in messages: @@ -406,7 +406,7 @@ class OutputImageChild(QThread): self.time_range = time_range def run(self): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) for message in self.messages: str_content = message[7] BytesExtra = message[10]