xtn-tools-pro 1.0.0.2.4__tar.gz → 1.0.0.2.6__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. {xtn-tools-pro-1.0.0.2.4/xtn_tools_pro.egg-info → xtn-tools-pro-1.0.0.2.6}/PKG-INFO +1 -1
  2. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/setup.py +1 -1
  3. xtn-tools-pro-1.0.0.2.6/xtn_tools_pro/task_pro/go_fun.py +43 -0
  4. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/utils/file_utils.py +13 -0
  5. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6/xtn_tools_pro.egg-info}/PKG-INFO +1 -1
  6. xtn-tools-pro-1.0.0.2.4/xtn_tools_pro/task_pro/go_fun.py +0 -17
  7. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/LICENSE +0 -0
  8. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/README.md +0 -0
  9. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/setup.cfg +0 -0
  10. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/__init__.py +0 -0
  11. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/db/MongoDB.py +0 -0
  12. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/db/MysqlDB.py +0 -0
  13. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/db/RedisDB.py +0 -0
  14. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/db/__init__.py +0 -0
  15. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/proxy/XiaoXiangProxy.py +0 -0
  16. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/proxy/__init__.py +0 -0
  17. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/proxy/proxy.py +0 -0
  18. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/task_pro/__init__.py +0 -0
  19. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/tools.py +0 -0
  20. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/utils/__init__.py +0 -0
  21. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/utils/crypto.py +0 -0
  22. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/utils/helpers.py +0 -0
  23. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/utils/log.py +0 -0
  24. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/utils/retry.py +0 -0
  25. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/utils/sql.py +0 -0
  26. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro/utils/time_utils.py +0 -0
  27. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro.egg-info/SOURCES.txt +0 -0
  28. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro.egg-info/dependency_links.txt +0 -0
  29. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro.egg-info/requires.txt +0 -0
  30. {xtn-tools-pro-1.0.0.2.4 → xtn-tools-pro-1.0.0.2.6}/xtn_tools_pro.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.2.4
3
+ Version: 1.0.0.2.6
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@gmail.com
@@ -15,7 +15,7 @@ with open("README.md", "r") as f:
15
15
 
16
16
  setuptools.setup(
17
17
  name="xtn-tools-pro", # 模块名称
18
- version="1.0.0.2.4", # 版本
18
+ version="1.0.0.2.6", # 版本
19
19
  author="xtn", # 作者
20
20
  author_email="czw011122@gmail.com", # 作者邮箱
21
21
  description="xtn 开发工具", # 模块简介
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ # 说明:
5
+ # 程序说明xxxxxxxxxxxxxxxxxxx
6
+ # History:
7
+ # Date Author Version Modification
8
+ # --------------------------------------------------------------------------------------------------
9
+ # 2025/1/14 xiatn V00.01.000 新建
10
+ # --------------------------------------------------------------------------------------------------
11
+ import os
12
+ import configparser
13
+ from xtn_tools_pro.utils.file_utils import check_file_exists
14
+
15
+
16
+ class GoFun:
17
+ def __init__(self, ini_file=""):
18
+ if not ini_file:
19
+ ini_current_dir = os.getcwd()
20
+ ini_file = os.path.join(ini_current_dir, "st.ini")
21
+ if not check_file_exists(ini_file):
22
+ raise Exception("st.ini 配置文件不存在,请在当前文件夹中新建该配置文件")
23
+
24
+ # 读取配置信息
25
+ config = configparser.ConfigParser()
26
+ config.read(ini_file)
27
+ server_host = config.get('server', 'host')
28
+ server_port = config.get('server', 'port')
29
+ server_task = config.get('server', 'task')
30
+ server_auto = config.get('server', 'auto')
31
+
32
+ print(server_host, server_port, server_task)
33
+ if server_port:
34
+ task_host = f"http://{server_host}:{server_port}"
35
+ else:
36
+ task_host = f"http://{server_host}"
37
+
38
+ download_url = task_host + "/filter_server/phone/get"
39
+ upload_url = task_host + "/filter_server/phone/update"
40
+
41
+ print(server_auto)
42
+ print(download_url)
43
+ print(upload_url)
@@ -35,6 +35,7 @@ def get_file_check_filename(file_name):
35
35
  sanitized_filename = sanitized_filename[:max_length]
36
36
  return sanitized_filename
37
37
 
38
+
38
39
  def mkdirs_dir(file_path):
39
40
  """
40
41
  传入一个文件路径创建对应的文件夹,如果某一段不存在则一路创建下去
@@ -45,6 +46,18 @@ def mkdirs_dir(file_path):
45
46
  if not os.path.exists(directory):
46
47
  os.makedirs(directory)
47
48
 
49
+
50
+ def check_file_exists(file_path):
51
+ """
52
+ 传入一个文件路径,判断文件是否存在
53
+ :param file_path:
54
+ :return:
55
+ """
56
+ if os.path.exists(file_path):
57
+ return True
58
+ return False
59
+
60
+
48
61
  if __name__ == '__main__':
49
62
  pass
50
63
  print(get_file_extension('file/2024-04-19/BOSCH GEX 125-1A/125-1AE砂磨机操作说明书:[1]_jingyan.txt'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.2.4
3
+ Version: 1.0.0.2.6
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@gmail.com
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
-
4
- # 说明:
5
- # 程序说明xxxxxxxxxxxxxxxxxxx
6
- # History:
7
- # Date Author Version Modification
8
- # --------------------------------------------------------------------------------------------------
9
- # 2025/1/14 xiatn V00.01.000 新建
10
- # --------------------------------------------------------------------------------------------------
11
- import os
12
-
13
-
14
- class GoFun:
15
- def __init__(self):
16
- current_directory = os.getcwd()
17
- print(f"The current working directory is: {current_directory}")