mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-22 19:02:17 +08:00
修复一些问题
This commit is contained in:
parent
40c57c5891
commit
ad25b4550c
@ -10,8 +10,6 @@
|
|||||||
from .hard_link import HardLink
|
from .hard_link import HardLink
|
||||||
from .micro_msg import MicroMsg
|
from .micro_msg import MicroMsg
|
||||||
from .media_msg import MediaMsg
|
from .media_msg import MediaMsg
|
||||||
# from . import data
|
|
||||||
# from . import output
|
|
||||||
from .misc import Misc
|
from .misc import Misc
|
||||||
from .msg import Msg
|
from .msg import Msg
|
||||||
from .msg import MsgType
|
from .msg import MsgType
|
||||||
@ -31,4 +29,12 @@ def close_db():
|
|||||||
media_msg_db.close()
|
media_msg_db.close()
|
||||||
|
|
||||||
|
|
||||||
|
def init_db():
|
||||||
|
misc_db.init_database()
|
||||||
|
msg_db.init_database()
|
||||||
|
micro_msg_db.init_database()
|
||||||
|
hard_link_db.init_database()
|
||||||
|
media_msg_db.init_database()
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['output', 'misc_db', 'micro_msg_db', 'msg_db', 'hard_link_db', 'MsgType', "media_msg_db"]
|
__all__ = ['output', 'misc_db', 'micro_msg_db', 'msg_db', 'hard_link_db', 'MsgType', "media_msg_db"]
|
||||||
|
@ -206,8 +206,8 @@ class Msg:
|
|||||||
('', '', ['', ''], ''),
|
('', '', ['', ''], ''),
|
||||||
('', '', '', '')
|
('', '', '', '')
|
||||||
))
|
))
|
||||||
print(keyword,res)
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def get_contact(self, contacts):
|
def get_contact(self, contacts):
|
||||||
if not self.open_flag:
|
if not self.open_flag:
|
||||||
return None
|
return None
|
||||||
@ -227,6 +227,7 @@ class Msg:
|
|||||||
contacts[i].append(0)
|
contacts[i].append(0)
|
||||||
contacts.sort(key=lambda cur_contact: cur_contact[-1], reverse=True)
|
contacts.sort(key=lambda cur_contact: cur_contact[-1], reverse=True)
|
||||||
return contacts
|
return contacts
|
||||||
|
|
||||||
def get_messages_by_days(self, username_, is_Annual_report_=False, year_='2023'):
|
def get_messages_by_days(self, username_, is_Annual_report_=False, year_='2023'):
|
||||||
if is_Annual_report_:
|
if is_Annual_report_:
|
||||||
sql = '''
|
sql = '''
|
||||||
|
@ -259,7 +259,6 @@ class ChildThread(QThread):
|
|||||||
f'''{str_time} {name}\n[语音]\n\n'''
|
f'''{str_time} {name}\n[语音]\n\n'''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def emoji(self, doc, message):
|
def emoji(self, doc, message):
|
||||||
origin_docx_path = f"{os.path.abspath('.')}/data/聊天记录/{self.contact.remark}"
|
origin_docx_path = f"{os.path.abspath('.')}/data/聊天记录/{self.contact.remark}"
|
||||||
str_content = message[7]
|
str_content = message[7]
|
||||||
@ -333,7 +332,6 @@ class ChildThread(QThread):
|
|||||||
f'''{str_time} {name}\n{content.get('title')}\n引用:未知\n\n'''
|
f'''{str_time} {name}\n{content.get('title')}\n引用:未知\n\n'''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def system_msg(self, doc, message):
|
def system_msg(self, doc, message):
|
||||||
str_content = message[7]
|
str_content = message[7]
|
||||||
is_send = message[4]
|
is_send = message[4]
|
||||||
@ -486,6 +484,7 @@ class ChildThread(QThread):
|
|||||||
elif type_ == 49 and sub_type == 57:
|
elif type_ == 49 and sub_type == 57:
|
||||||
self.refermsg(f, message)
|
self.refermsg(f, message)
|
||||||
self.okSignal.emit(1)
|
self.okSignal.emit(1)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.output_type == Output.DOCX:
|
if self.output_type == Output.DOCX:
|
||||||
return
|
return
|
||||||
|
@ -3,6 +3,7 @@ from collections import Counter
|
|||||||
from PyQt5.QtCore import QFile, QTextStream, QIODevice
|
from PyQt5.QtCore import QFile, QTextStream, QIODevice
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.append('.')
|
sys.path.append('.')
|
||||||
|
|
||||||
from app.DataBase import msg_db, MsgType
|
from app.DataBase import msg_db, MsgType
|
||||||
@ -60,15 +61,7 @@ def wordcloud(wxid, is_Annual_report=False, year='2023', who='1'):
|
|||||||
keyword, max_num = text_data[0]
|
keyword, max_num = text_data[0]
|
||||||
w = (
|
w = (
|
||||||
WordCloud(init_opts=opts.InitOpts(width=f"{wordcloud_width}px", height=f"{wordcloud_height}px"))
|
WordCloud(init_opts=opts.InitOpts(width=f"{wordcloud_width}px", height=f"{wordcloud_height}px"))
|
||||||
.add(series_name="聊天文字", data_pair=text_data, word_size_range=[20, 100])
|
.add(series_name="聊天文字", data_pair=text_data, word_size_range=[5, 40])
|
||||||
.set_global_opts(
|
|
||||||
title_opts=opts.TitleOpts(
|
|
||||||
title=f"词云图", subtitle=f"总计{total_msg_len}字",
|
|
||||||
title_textstyle_opts=opts.TextStyleOpts(font_size=23)
|
|
||||||
),
|
|
||||||
tooltip_opts=opts.TooltipOpts(is_show=True),
|
|
||||||
legend_opts=opts.LegendOpts(is_show=False)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
# return w.render_embed()
|
# return w.render_embed()
|
||||||
return {
|
return {
|
||||||
|
@ -1,9 +1,21 @@
|
|||||||
version = '0.2.8'
|
version = '0.2.9'
|
||||||
contact = '701805520'
|
contact = '701805520'
|
||||||
|
github = 'https://github.com/LC044/WeChatMsg'
|
||||||
|
website = 'http://memotrace.lc044.love/'
|
||||||
|
copyright = '©2023-2023 ShuaikangZhou'
|
||||||
description = [
|
description = [
|
||||||
'1. 支持获取个人信息<br>',
|
'1. 支持获取个人信息<br>',
|
||||||
'2. 支持显示聊天界面<br>',
|
'2. 支持显示聊天界面<br>',
|
||||||
'3. 支持导出聊天记录<br> * csv<br> * html<br> * txt<br>',
|
'3. 支持导出聊天记录<br> * csv<br> * html<br> * '
|
||||||
|
'txt<br>',
|
||||||
'4. 查找联系人<br>',
|
'4. 查找联系人<br>',
|
||||||
'5. 生成年度报告<br>',
|
'5. 生成年度报告<br>',
|
||||||
]
|
]
|
||||||
|
about = f'''
|
||||||
|
版本:{version}<br>
|
||||||
|
QQ交流群:{contact},加群要求请阅读文档<br>
|
||||||
|
地址:<a href='{github}'>{github}</a><br>
|
||||||
|
官网:<a href='{website}'>{website}</a><br>
|
||||||
|
新特性:<br>{''.join(['' + i for i in description])}<br>
|
||||||
|
Copyright {copyright}
|
||||||
|
'''
|
||||||
|
@ -53,6 +53,7 @@ class ContactPC:
|
|||||||
self.smallHeadImgBLOG = b''
|
self.smallHeadImgBLOG = b''
|
||||||
self.avatar = QPixmap()
|
self.avatar = QPixmap()
|
||||||
self.avatar_path = Icon.Default_avatar_path
|
self.avatar_path = Icon.Default_avatar_path
|
||||||
|
self.is_chatroom = self.wxid.__contains__('@chatroom')
|
||||||
|
|
||||||
def set_avatar(self, img_bytes):
|
def set_avatar(self, img_bytes):
|
||||||
if not img_bytes:
|
if not img_bytes:
|
||||||
|
@ -225,10 +225,7 @@ class MainWinController(QMainWindow, mainwindow.Ui_MainWindow):
|
|||||||
"""
|
"""
|
||||||
关于
|
关于
|
||||||
"""
|
"""
|
||||||
QMessageBox.about(self, "关于",
|
QMessageBox.about(self, "关于",config.about)
|
||||||
f'''版本:{config.version}<br>QQ交流群:{config.contact},加群要求请阅读文档<br>地址:<a href='https://github.com/LC044/WeChatMsg'>https://github.com/LC044/WeChatMsg</a><br>新特性:<br>{''.join(['' + i for i in config.description])}
|
|
||||||
'''
|
|
||||||
)
|
|
||||||
|
|
||||||
def decrypt_success(self):
|
def decrypt_success(self):
|
||||||
QMessageBox.about(self, "解密成功", "请重新启动")
|
QMessageBox.about(self, "解密成功", "请重新启动")
|
||||||
|
Loading…
Reference in New Issue
Block a user