mdbq 2.8.8__py3-none-any.whl → 2.8.9__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.
mdbq/company/copysh.py
CHANGED
@@ -301,6 +301,30 @@ class TbFiles:
|
|
301
301
|
now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
302
302
|
print(f'{now} 同步完成!')
|
303
303
|
|
304
|
+
def refresh_excel(self):
|
305
|
+
# 刷新共享位置的指定文件/文件夹
|
306
|
+
if platform.system() == 'Windows' and socket.gethostname() == 'company':
|
307
|
+
excel_path = os.path.join(self.share_path, 'EXCEL报表')
|
308
|
+
files = os.listdir(excel_path)
|
309
|
+
files = [f'{excel_path}\\{item}' for item in files if item.endswith('.xlsx') or item.endswith('.xls')]
|
310
|
+
r = refresh_all.RefreshAll()
|
311
|
+
for file in files:
|
312
|
+
if '~' in file or 'DS_Store' in file or 'baidu' in file or 'xunlei' in file:
|
313
|
+
continue
|
314
|
+
if file.endswith('.xlsx') or file.endswith('.xls'):
|
315
|
+
r.refresh_excel(file=file)
|
316
|
+
time.sleep(5)
|
317
|
+
|
318
|
+
# 临时加的
|
319
|
+
# excel_file = f'\\\\192.168.1.198\\时尚事业部\\01.运营部\\0-电商周报-每周五更新\\0-WLM_运营周报-1012输出.xlsx'
|
320
|
+
dir_files = f'\\\\192.168.1.198\\时尚事业部\\01.运营部\\0-电商周报-每周五更新'
|
321
|
+
files = os.listdir(dir_files)
|
322
|
+
for file in files:
|
323
|
+
if file.endswith('.xlsx') and file.startswith(
|
324
|
+
'0-WLM_运营周报') and '~' not in file and 'baidu' not in file:
|
325
|
+
excel_file = os.path.join(dir_files, file)
|
326
|
+
r.refresh_excel(file=excel_file)
|
327
|
+
|
304
328
|
def check_upload_mysql(self):
|
305
329
|
# 每天只更新一次
|
306
330
|
today = datetime.date.today()
|
@@ -407,12 +431,15 @@ def main():
|
|
407
431
|
)
|
408
432
|
# print(conf)
|
409
433
|
myconfig.write_back(datas=conf) # 写回文件生效
|
434
|
+
|
435
|
+
if socket.gethostname() == 'company' or socket.gethostname() == 'Mac2.local':
|
436
|
+
t.refresh_excel()
|
410
437
|
now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S ')
|
411
438
|
print(f'{now}数据完成!')
|
412
439
|
|
413
|
-
t.sleep_minutes = 5 # 同步前休眠时间
|
414
|
-
if socket.gethostname() == 'company' or socket.gethostname() == 'Mac2.local':
|
415
|
-
|
440
|
+
# t.sleep_minutes = 5 # 同步前休眠时间
|
441
|
+
# if socket.gethostname() == 'company' or socket.gethostname() == 'Mac2.local':
|
442
|
+
# t.tb_file()
|
416
443
|
time.sleep(600) # 检测间隔
|
417
444
|
|
418
445
|
|
@@ -12,7 +12,7 @@ mdbq/clean/__init__.py,sha256=A1d6x3L27j4NtLgiFV5TANwEkLuaDfPHDQNrPBbNWtU,41
|
|
12
12
|
mdbq/clean/clean_upload.py,sha256=FJxoEX-2QKuFhrF1ecl_LdZ1uFnVPx4HigNcXdErB28,66561
|
13
13
|
mdbq/clean/data_clean.py,sha256=ucfslhqXVZoH2QaXHSAWDky0GhIvH9f4GeNaHg4SrFE,104790
|
14
14
|
mdbq/company/__init__.py,sha256=qz8F_GsP_pMB5PblgJAUAMjasuZbOEp3qQOCB39E8f0,21
|
15
|
-
mdbq/company/copysh.py,sha256=
|
15
|
+
mdbq/company/copysh.py,sha256=UD5BLBe9uMfqjdslyY7-TtGXuJI5jsol-w4kIQFDfQk,21577
|
16
16
|
mdbq/company/copysh_bak.py,sha256=NvlXCBZBcO2GIT5nLRYYqhOyHWM1-1RE7DHvgbj6jmQ,19723
|
17
17
|
mdbq/company/home_sh.py,sha256=42CZ2tZIXHLl2mOl2gk2fZnjH2IHh1VJ1s3qHABjonY,18021
|
18
18
|
mdbq/config/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
@@ -45,7 +45,7 @@ mdbq/req_post/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
|
45
45
|
mdbq/req_post/req_tb.py,sha256=PexWSCPJNM6Tv0ol4lAWIhlOwsAr_frnjtcdSHCFiek,36179
|
46
46
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
47
47
|
mdbq/spider/aikucun.py,sha256=jHrdGWBJQaSywx7V-U4YuM6vWkwC5SR5tTOOdB3YU_c,17306
|
48
|
-
mdbq-2.8.
|
49
|
-
mdbq-2.8.
|
50
|
-
mdbq-2.8.
|
51
|
-
mdbq-2.8.
|
48
|
+
mdbq-2.8.9.dist-info/METADATA,sha256=2_jXKvIIyj0iXk8T4uADVdvpKKF_kxFoWlN75PLoQlo,243
|
49
|
+
mdbq-2.8.9.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
50
|
+
mdbq-2.8.9.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
51
|
+
mdbq-2.8.9.dist-info/RECORD,,
|
File without changes
|