mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-22 19:02:17 +08:00
修复路径问题
This commit is contained in:
parent
87a48c5955
commit
75cc118d99
@ -586,5 +586,19 @@
|
|||||||
39016312,
|
39016312,
|
||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
|
],
|
||||||
|
"3.0.0.0": [
|
||||||
|
25834908,
|
||||||
|
25846332,
|
||||||
|
25834960,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"3.7.0.23": [
|
||||||
|
37105844,
|
||||||
|
37106952,
|
||||||
|
37105896,
|
||||||
|
0,
|
||||||
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -586,5 +586,19 @@
|
|||||||
39016312,
|
39016312,
|
||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
|
],
|
||||||
|
"3.0.0.0": [
|
||||||
|
25834908,
|
||||||
|
25846332,
|
||||||
|
25834960,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"3.7.0.23": [
|
||||||
|
37105844,
|
||||||
|
37106952,
|
||||||
|
37105896,
|
||||||
|
0,
|
||||||
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -19,8 +19,10 @@ from app.DataBase import misc_db, micro_msg_db, close_db
|
|||||||
from app.ui.Icon import Icon
|
from app.ui.Icon import Icon
|
||||||
from . import mainwindow
|
from . import mainwindow
|
||||||
# 不能删,删了会出错
|
# 不能删,删了会出错
|
||||||
from .chat import ChatWindow
|
from app.ui.chat import ChatWindow
|
||||||
from .contact import ContactWindow
|
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 .menu.export import ExportDialog
|
||||||
from app.util.exporter.output import Output
|
from app.util.exporter.output import Output
|
||||||
from ..components.QCursorGif import QCursorGif
|
from ..components.QCursorGif import QCursorGif
|
||||||
|
@ -239,7 +239,7 @@ class DocxExporter(ExporterBase):
|
|||||||
return content_cell
|
return content_cell
|
||||||
|
|
||||||
def music_share(self, doc, message):
|
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]
|
is_send = message[4]
|
||||||
timestamp = message[5]
|
timestamp = message[5]
|
||||||
content = music_share(message[11])
|
content = music_share(message[11])
|
||||||
@ -255,7 +255,7 @@ class DocxExporter(ExporterBase):
|
|||||||
display_name = self.get_display_name(is_send, message)
|
display_name = self.get_display_name(is_send, message)
|
||||||
|
|
||||||
def share_card(self, doc, 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]
|
is_send = message[4]
|
||||||
timestamp = message[5]
|
timestamp = message[5]
|
||||||
bytesExtra = message[10]
|
bytesExtra = message[10]
|
||||||
@ -282,7 +282,7 @@ class DocxExporter(ExporterBase):
|
|||||||
app_logo = ''
|
app_logo = ''
|
||||||
|
|
||||||
def merge_docx(self, conRemark, n):
|
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 = []
|
all_file_path = []
|
||||||
for i in range(n):
|
for i in range(n):
|
||||||
file_name = f"{conRemark}{i}.docx"
|
file_name = f"{conRemark}{i}.docx"
|
||||||
|
@ -63,7 +63,7 @@ class HtmlExporter(ExporterBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def audio(self, doc, message):
|
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_content = message[7]
|
||||||
str_time = message[8]
|
str_time = message[8]
|
||||||
is_send = message[4]
|
is_send = message[4]
|
||||||
@ -99,7 +99,7 @@ class HtmlExporter(ExporterBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def file(self, doc, message):
|
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]
|
bytesExtra = message[10]
|
||||||
compress_content = message[11]
|
compress_content = message[11]
|
||||||
str_time = message[8]
|
str_time = message[8]
|
||||||
@ -170,7 +170,7 @@ class HtmlExporter(ExporterBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def video(self, doc, message):
|
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]
|
type_ = message[2]
|
||||||
str_content = message[7]
|
str_content = message[7]
|
||||||
str_time = message[8]
|
str_time = message[8]
|
||||||
@ -211,7 +211,7 @@ class HtmlExporter(ExporterBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def music_share(self, doc, message):
|
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]
|
is_send = message[4]
|
||||||
timestamp = message[5]
|
timestamp = message[5]
|
||||||
content = music_share(message[11])
|
content = music_share(message[11])
|
||||||
@ -232,7 +232,7 @@ class HtmlExporter(ExporterBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def share_card(self, doc, message):
|
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]
|
is_send = message[4]
|
||||||
timestamp = message[5]
|
timestamp = message[5]
|
||||||
bytesExtra = message[10]
|
bytesExtra = message[10]
|
||||||
@ -379,7 +379,7 @@ class OutputMedia(QThread):
|
|||||||
self.contact = contact
|
self.contact = contact
|
||||||
|
|
||||||
def run(self):
|
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)
|
messages = msg_db.get_messages_by_type(self.contact.wxid, 34)
|
||||||
for message in messages:
|
for message in messages:
|
||||||
is_send = message[4]
|
is_send = message[4]
|
||||||
@ -408,7 +408,7 @@ class OutputEmoji(QThread):
|
|||||||
self.contact = contact
|
self.contact = contact
|
||||||
|
|
||||||
def run(self):
|
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)
|
messages = msg_db.get_messages_by_type(self.contact.wxid, 47)
|
||||||
for message in messages:
|
for message in messages:
|
||||||
str_content = message[7]
|
str_content = message[7]
|
||||||
@ -445,7 +445,7 @@ class OutputImage(QThread):
|
|||||||
print("图片导出完成")
|
print("图片导出完成")
|
||||||
|
|
||||||
def run(self):
|
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)
|
messages = msg_db.get_messages_by_type(self.contact.wxid, 3)
|
||||||
base_path = os.path.join(output_dir, '聊天记录', self.contact.remark, 'image')
|
base_path = os.path.join(output_dir, '聊天记录', self.contact.remark, 'image')
|
||||||
for message in messages:
|
for message in messages:
|
||||||
@ -487,7 +487,7 @@ class OutputImageChild(QThread):
|
|||||||
self.messages = messages
|
self.messages = messages
|
||||||
|
|
||||||
def run(self):
|
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:
|
for message in self.messages:
|
||||||
str_content = message[7]
|
str_content = message[7]
|
||||||
BytesExtra = message[10]
|
BytesExtra = message[10]
|
||||||
|
@ -81,7 +81,7 @@ class Output(QThread):
|
|||||||
@return:
|
@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)
|
os.makedirs(origin_path, exist_ok=True)
|
||||||
filename = QFileDialog.getSaveFileName(None, "save file", os.path.join(os.getcwd(), 'messages.csv'),
|
filename = QFileDialog.getSaveFileName(None, "save file", os.path.join(os.getcwd(), 'messages.csv'),
|
||||||
"csv files (*.csv);;all files(*.*)")
|
"csv files (*.csv);;all files(*.*)")
|
||||||
@ -337,7 +337,7 @@ class OutputEmoji(QThread):
|
|||||||
self.time_range = time_range
|
self.time_range = time_range
|
||||||
|
|
||||||
def run(self):
|
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)
|
messages = msg_db.get_messages_by_type(self.contact.wxid, 47, time_range=self.time_range)
|
||||||
for message in messages:
|
for message in messages:
|
||||||
str_content = message[7]
|
str_content = message[7]
|
||||||
@ -374,7 +374,7 @@ class OutputImage(QThread):
|
|||||||
print('图片导出完成')
|
print('图片导出完成')
|
||||||
|
|
||||||
def run(self):
|
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)
|
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')
|
base_path = os.path.join(output_dir,'聊天记录',self.contact.remark,'image')
|
||||||
for message in messages:
|
for message in messages:
|
||||||
@ -406,7 +406,7 @@ class OutputImageChild(QThread):
|
|||||||
self.time_range = time_range
|
self.time_range = time_range
|
||||||
|
|
||||||
def run(self):
|
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:
|
for message in self.messages:
|
||||||
str_content = message[7]
|
str_content = message[7]
|
||||||
BytesExtra = message[10]
|
BytesExtra = message[10]
|
||||||
|
Loading…
Reference in New Issue
Block a user