merge 输出如果不是文件,则自动创建文件
This commit is contained in:
parent
6eef35d41c
commit
d091ba38d7
@ -20,6 +20,9 @@ def merge_copy_db(db_path, save_path):
|
|||||||
|
|
||||||
# 合并相同名称的数据库 MSG0-MSG9.db
|
# 合并相同名称的数据库 MSG0-MSG9.db
|
||||||
def merge_msg_db(db_path: list, save_path: str, CreateTime: int = 0): # CreateTime: 从这个时间开始的消息 10位时间戳
|
def merge_msg_db(db_path: list, save_path: str, CreateTime: int = 0): # CreateTime: 从这个时间开始的消息 10位时间戳
|
||||||
|
# 判断save_path是否为文件夹
|
||||||
|
if os.path.isdir(save_path):
|
||||||
|
save_path = os.path.join(save_path, "merge_MSG.db")
|
||||||
|
|
||||||
merged_conn = sqlite3.connect(save_path)
|
merged_conn = sqlite3.connect(save_path)
|
||||||
merged_cursor = merged_conn.cursor()
|
merged_cursor = merged_conn.cursor()
|
||||||
@ -112,6 +115,9 @@ def merge_msg_db(db_path: list, save_path: str, CreateTime: int = 0): # CreateT
|
|||||||
|
|
||||||
|
|
||||||
def merge_media_msg_db(db_path: list, save_path: str):
|
def merge_media_msg_db(db_path: list, save_path: str):
|
||||||
|
# 判断save_path是否为文件夹
|
||||||
|
if os.path.isdir(save_path):
|
||||||
|
save_path = os.path.join(save_path, "merge_Media.db")
|
||||||
merged_conn = sqlite3.connect(save_path)
|
merged_conn = sqlite3.connect(save_path)
|
||||||
merged_cursor = merged_conn.cursor()
|
merged_cursor = merged_conn.cursor()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user