更新导出的csv命名方式
This commit is contained in:
parent
63dce8ea26
commit
5a3f874178
@ -229,6 +229,7 @@ def export_csv(username, outpath, MSG_ALL_db_path, page_size=5000):
|
||||
start_index = i
|
||||
data = get_msg_list(MSG_ALL_db_path, username, start_index, page_size)
|
||||
if len(data) == 0:
|
||||
return False, "没有聊天记录"
|
||||
break
|
||||
save_path = os.path.join(outpath, f"{username}_{i}_{i + page_size}.csv")
|
||||
with open(save_path, "w", encoding="utf-8") as f:
|
||||
|
@ -287,11 +287,9 @@ class MainExportChatRecords():
|
||||
sb_decrypt.add_argument("-media", "--media_path", type=str, help="解密后的 MediaMSG.db 的路径", required=True,
|
||||
metavar="")
|
||||
sb_decrypt.add_argument("-fs", "--filestorage_path", type=str,
|
||||
help="(可选)文件夹FileStorage的路径(用于显示图片)", required=False,
|
||||
metavar="")
|
||||
help="(可选)文件夹FileStorage的路径(用于显示图片)", required=False, metavar="")
|
||||
sb_decrypt.add_argument("-t", "--type", type=str, help="导出类型(可选:html,csv)", required=False,
|
||||
default="html",
|
||||
metavar="")
|
||||
default="html", metavar="")
|
||||
return sb_decrypt
|
||||
|
||||
def run(self, args):
|
||||
|
Loading…
Reference in New Issue
Block a user