xtn-tools-pro 1.0.1.2.7__py3-none-any.whl → 1.0.1.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xtn_tools_pro/utils/log.py +1 -1
- xtn_tools_pro/utils/set_data.py +10 -6
- {xtn_tools_pro-1.0.1.2.7.dist-info → xtn_tools_pro-1.0.1.3.0.dist-info}/METADATA +1 -1
- {xtn_tools_pro-1.0.1.2.7.dist-info → xtn_tools_pro-1.0.1.3.0.dist-info}/RECORD +8 -8
- {xtn_tools_pro-1.0.1.2.7.dist-info → xtn_tools_pro-1.0.1.3.0.dist-info}/LICENSE +0 -0
- {xtn_tools_pro-1.0.1.2.7.dist-info → xtn_tools_pro-1.0.1.3.0.dist-info}/WHEEL +0 -0
- {xtn_tools_pro-1.0.1.2.7.dist-info → xtn_tools_pro-1.0.1.3.0.dist-info}/entry_points.txt +0 -0
- {xtn_tools_pro-1.0.1.2.7.dist-info → xtn_tools_pro-1.0.1.3.0.dist-info}/top_level.txt +0 -0
xtn_tools_pro/utils/log.py
CHANGED
@@ -118,7 +118,7 @@ class Log:
|
|
118
118
|
# 记录当前的日期,用于之后检查日期是否已经改变
|
119
119
|
self.current_date = get_time_timestamp_to_datestr(format="%Y_%m_%d")
|
120
120
|
# 记录日志文件的路径模板,用于之后创建新的日志文件
|
121
|
-
self.path_template = f"logs/{{date}}/{name}.log"
|
121
|
+
self.path_template = f"{path}/logs/{{date}}/{name}.log"
|
122
122
|
path = self.path_template.format(date=self.current_date)
|
123
123
|
# print(path)
|
124
124
|
if is_write_to_file:
|
xtn_tools_pro/utils/set_data.py
CHANGED
@@ -93,8 +93,9 @@ class PSetDataObj:
|
|
93
93
|
line = line_i.strip()
|
94
94
|
seen_list.append(line)
|
95
95
|
seen_list = list(set(seen_list))
|
96
|
-
|
97
|
-
|
96
|
+
if seen_list:
|
97
|
+
w_txt = "\n".join(seen_list)
|
98
|
+
f_w.write(w_txt + "\n")
|
98
99
|
os.remove(shard_path) # 删除临时文件
|
99
100
|
|
100
101
|
with open(result_w_path, "r", encoding="utf-8") as fp_r:
|
@@ -159,8 +160,9 @@ class PSetDataObj:
|
|
159
160
|
line = line_i.strip()
|
160
161
|
seen_list.append(line)
|
161
162
|
seen_list = list(set(seen_list))
|
162
|
-
|
163
|
-
|
163
|
+
if seen_list:
|
164
|
+
w_txt = "\n".join(seen_list)
|
165
|
+
f_w.write(w_txt + "\n")
|
164
166
|
os.remove(shard_path) # 删除临时文件
|
165
167
|
|
166
168
|
with open(result_w_path, "r", encoding="utf-8") as fp_r:
|
@@ -225,8 +227,9 @@ class PSetDataObj:
|
|
225
227
|
b_seen_list.append(line)
|
226
228
|
|
227
229
|
seen_list = list(set(a_seen_list) - set(b_seen_list))
|
228
|
-
|
229
|
-
|
230
|
+
if seen_list:
|
231
|
+
w_txt = "\n".join(seen_list)
|
232
|
+
result_f_w.write(w_txt + "\n")
|
230
233
|
os.remove(a_shard_path) # 删除临时文件
|
231
234
|
os.remove(b_shard_path) # 删除临时文件
|
232
235
|
|
@@ -349,5 +352,6 @@ class PSetDataObj:
|
|
349
352
|
:param data_list:
|
350
353
|
:return:
|
351
354
|
"""
|
355
|
+
if not data_list: return
|
352
356
|
with open(file_w_path, "w", encoding="utf-8") as result_w_f:
|
353
357
|
result_w_f.write("\n".join(data_list))
|
@@ -57,15 +57,15 @@ xtn_tools_pro/utils/audio_video.py,sha256=3Im3tGOW6IbmqDcrE1SJUg6eGyLGEyq11Qu6TC
|
|
57
57
|
xtn_tools_pro/utils/crypto.py,sha256=B6NC2yVxtwrbSZnngudTFRm7YRGKKEusydVVYWwxFHs,5231
|
58
58
|
xtn_tools_pro/utils/file_utils.py,sha256=vsUgds8I8Z2pL9a4oCv1q0JrZsDP29qLyLyGVqj5sX8,3311
|
59
59
|
xtn_tools_pro/utils/helpers.py,sha256=0CTMY7wfSQR_DC9-v1lkKQLpWcB1FL9V_kw_5DOcZ40,4454
|
60
|
-
xtn_tools_pro/utils/log.py,sha256=
|
60
|
+
xtn_tools_pro/utils/log.py,sha256=MPT9q1keNYroaw6U9a-Gc0iT0ceUEVTI-Tz2GEiWLUc,11038
|
61
61
|
xtn_tools_pro/utils/retry.py,sha256=0wjHsR5DBBKpv4naMfxiky8kprrZes4WURIfFQ4H708,1657
|
62
|
-
xtn_tools_pro/utils/set_data.py,sha256=
|
62
|
+
xtn_tools_pro/utils/set_data.py,sha256=UR5S8xBqc4Vk8zpbrNVsxKhwaBAenaEdC7O-N3s7haw,17767
|
63
63
|
xtn_tools_pro/utils/shell.py,sha256=s6sJedxLLQokcI1hF5YSD3qgGUPK0brNcP-D3-yv54I,3790
|
64
64
|
xtn_tools_pro/utils/sql.py,sha256=EAKzbkZP7Q09j15Gm6o0_uq0qgQmcCQT6EAawbpp4v0,6263
|
65
65
|
xtn_tools_pro/utils/time_utils.py,sha256=TUtzG61PeVYXhaQd6pBrXAdlz7tBispNIRQRcGhE2No,4859
|
66
|
-
xtn_tools_pro-1.0.1.
|
67
|
-
xtn_tools_pro-1.0.1.
|
68
|
-
xtn_tools_pro-1.0.1.
|
69
|
-
xtn_tools_pro-1.0.1.
|
70
|
-
xtn_tools_pro-1.0.1.
|
71
|
-
xtn_tools_pro-1.0.1.
|
66
|
+
xtn_tools_pro-1.0.1.3.0.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
67
|
+
xtn_tools_pro-1.0.1.3.0.dist-info/METADATA,sha256=43e7Vi5-dnn6wCUNT4esYBCOa2Dc68jFNXcuM-siDfY,574
|
68
|
+
xtn_tools_pro-1.0.1.3.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
69
|
+
xtn_tools_pro-1.0.1.3.0.dist-info/entry_points.txt,sha256=t8CtXWOgw7nRDW3XNlZh8MT_P4l8EzsFnyWi5b3ovrc,68
|
70
|
+
xtn_tools_pro-1.0.1.3.0.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
|
71
|
+
xtn_tools_pro-1.0.1.3.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|