mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-21 18:12:18 +08:00
更改部分css;修复语音转文字部分问题
This commit is contained in:
parent
814f678f48
commit
013d7e6179
@ -82,10 +82,12 @@ class HtmlExporter(ExporterBase):
|
|||||||
try:
|
try:
|
||||||
audio_path = media_msg_db.get_audio_path(msgSvrId, output_path=origin_docx_path + "/voice")
|
audio_path = media_msg_db.get_audio_path(msgSvrId, output_path=origin_docx_path + "/voice")
|
||||||
audio_path = "./voice/" + os.path.basename(audio_path)
|
audio_path = "./voice/" + os.path.basename(audio_path)
|
||||||
voice_to_text = escape_js_and_html(media_msg_db.get_audio_text(str_content))
|
|
||||||
except:
|
except:
|
||||||
logger.error(traceback.format_exc())
|
logger.error(traceback.format_exc())
|
||||||
return
|
return
|
||||||
|
voice_to_text = media_msg_db.get_audio_text(str_content)
|
||||||
|
if voice_to_text and voice_to_text != "":
|
||||||
|
voice_to_text = escape_js_and_html(voice_to_text)
|
||||||
doc.write(
|
doc.write(
|
||||||
f'''{{ type:34, text:'{audio_path}',is_send:{is_send},avatar_path:'{avatar}',voice_to_text:'{voice_to_text}',timestamp:{timestamp},is_chatroom:{is_chatroom},displayname:'{display_name}'}},'''
|
f'''{{ type:34, text:'{audio_path}',is_send:{is_send},avatar_path:'{avatar}',voice_to_text:'{voice_to_text}',timestamp:{timestamp},is_chatroom:{is_chatroom},displayname:'{display_name}'}},'''
|
||||||
)
|
)
|
||||||
|
@ -272,7 +272,7 @@ class Msg:
|
|||||||
else:
|
else:
|
||||||
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[:40]
|
||||||
|
|
||||||
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_:
|
||||||
|
@ -217,7 +217,7 @@ audio{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chat-music-audio .player-original p ,.chat-file .app-info p{
|
.chat-music-audio .player-original p ,.chat-file .app-info p{
|
||||||
margin-top: 5px;
|
margin-top: 3px;
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,8 +239,11 @@ audio{
|
|||||||
.chat-music-audio .player-info ,.chat-file .file-info{
|
.chat-music-audio .player-info ,.chat-file .file-info{
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
margin-left: 4px;
|
||||||
|
margin-top: 15px;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
flex-basis: 200px;
|
flex-basis: 200px;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-music-audio .song-title,.chat-file .file-name {
|
.chat-music-audio .song-title,.chat-file .file-name {
|
||||||
@ -249,10 +252,20 @@ audio{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chat-music-audio .artist ,.chat-file .file-size{
|
.chat-music-audio .artist ,.chat-file .file-size{
|
||||||
margin-top: 10px;
|
margin-top: 5px;
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-info {
|
||||||
|
font-size: 13px;
|
||||||
|
margin-left: 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-size {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.chat-music-audio .play-button {
|
.chat-music-audio .play-button {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
@ -754,8 +767,8 @@ input {
|
|||||||
<div class="file-img flex2">
|
<div class="file-img flex2">
|
||||||
<img src="${message.icon_path}"/>
|
<img src="${message.icon_path}"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>` +
|
||||||
<div class="app-info"><p>${message.app_name}</p></div>`
|
(message.app_name ? `<div class="app-info"><p>${message.app_name}</p></div>` : "");
|
||||||
return messageFileTag;
|
return messageFileTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user