gomyck-tools 1.1.6__tar.gz → 1.1.8__tar.gz

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.
Files changed (62) hide show
  1. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/PKG-INFO +2 -2
  2. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/application.py +5 -6
  3. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/bottle_web_base.py +2 -2
  4. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/bottle_webserver.py +3 -4
  5. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/database.py +3 -0
  6. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/dict_wrapper.py +4 -1
  7. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/douglas_rarefy.py +3 -0
  8. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/html_soup.py +0 -7
  9. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/resource_bundle_tools.py +1 -1
  10. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/sign.py +1 -1
  11. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/sys_info.py +2 -3
  12. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/word_fill.py +1 -1
  13. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/gomyck_tools.egg-info/PKG-INFO +2 -2
  14. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/gomyck_tools.egg-info/requires.txt +1 -1
  15. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/setup.py +1 -1
  16. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/README.md +0 -0
  17. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/__init__.py +0 -0
  18. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/aes_tools.py +0 -0
  19. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/api_result.py +0 -0
  20. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/b64.py +0 -0
  21. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/bashPath.py +0 -0
  22. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/bottle_websocket.py +0 -0
  23. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/browser_element_tools.py +0 -0
  24. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/call.py +0 -0
  25. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/cjson.py +0 -0
  26. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/ckafka.py +0 -0
  27. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/compile_tools.py +0 -0
  28. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/console.py +0 -0
  29. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/cron_lite.py +0 -0
  30. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/date_utils.py +0 -0
  31. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/download_tools.py +0 -0
  32. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/enums.py +0 -0
  33. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/ex.py +0 -0
  34. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/excelOpt.py +0 -0
  35. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/http_utils.py +0 -0
  36. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/id_worker_tools.py +0 -0
  37. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/images_tools.py +0 -0
  38. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/imgDialog.py +0 -0
  39. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/license.py +0 -0
  40. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/metrics.py +0 -0
  41. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/mqtt_utils.py +0 -0
  42. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/obj.py +0 -0
  43. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/pacth.py +0 -0
  44. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/plan_area_tools.py +0 -0
  45. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/process_pool.py +0 -0
  46. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/pty_tools.py +0 -0
  47. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/screenshot_tools.py +0 -0
  48. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/sm_tools.py +0 -0
  49. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/strDiff.py +0 -0
  50. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/string_tools.py +0 -0
  51. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/sys_log.py +0 -0
  52. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/thread_pool.py +0 -0
  53. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/upload_tools.py +0 -0
  54. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/win_canvas.py +0 -0
  55. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/win_control.py +0 -0
  56. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/wordFill.py +0 -0
  57. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/word_fill_entity.py +0 -0
  58. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/ctools/work_path.py +0 -0
  59. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/gomyck_tools.egg-info/SOURCES.txt +0 -0
  60. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/gomyck_tools.egg-info/dependency_links.txt +0 -0
  61. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/gomyck_tools.egg-info/top_level.txt +0 -0
  62. {gomyck-tools-1.1.6 → gomyck-tools-1.1.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gomyck-tools
3
- Version: 1.1.6
3
+ Version: 1.1.8
4
4
  Summary: A ctools for python development by hao474798383
5
5
  Home-page: https://blog.gomyck.com
6
6
  Author: gomyck
@@ -16,7 +16,6 @@ Requires-Dist: chardet>=5.2.0
16
16
  Requires-Dist: psycopg2-binary>=2.9.9
17
17
  Requires-Dist: croniter>=3.0.3
18
18
  Requires-Dist: gmssl>=3.2.2
19
- Requires-Dist: psutil>=6.0.0
20
19
  Requires-Dist: jsonpath_ng>=1.6.1
21
20
  Requires-Dist: bottle==0.13.1
22
21
  Requires-Dist: requests==2.32.3
@@ -25,5 +24,6 @@ Requires-Dist: kafka-python==2.0.2
25
24
  Requires-Dist: bs4==0.0.2
26
25
  Requires-Dist: paho-mqtt==2.1.0
27
26
  Requires-Dist: fuzzywuzzy==0.18.0
27
+ Requires-Dist: pymysql==1.1.1
28
28
 
29
29
  this package is for python development
@@ -23,10 +23,9 @@ class Server:
23
23
  metricsPort = 8011 # 获取指标信息端口
24
24
  wsPort = 8012 # websocket服务端口
25
25
  startTime = time.time() # 系统启动时间
26
- baseWorkPath = work_path.get_user_work_path('hylink/hylink-rpa') # 基础的工作目录
26
+ baseWorkPath = work_path.get_user_work_path('rpa') # 基础的工作目录
27
27
  sysLogPath = os.path.join(baseWorkPath, ".logs") # 系统日志存储目录
28
28
  pythonHome = os.path.join(work_path.get_Users_path(), 'Public/python-3.8.9') # python根目录
29
- hylinkFunctionPath = os.path.join(pythonHome, "Lib", "site-packages", "hylink")
30
29
  indicatorsPath = os.path.join(baseWorkPath, "indicators") # 指标信息存储目录
31
30
  screenshotPath = os.path.join(baseWorkPath, "screenshot") # 截图存储目录
32
31
  controlServerAddr = None
@@ -117,10 +116,10 @@ def check_database():
117
116
  if db_size < 2000 * 1024: os.remove(db_file)
118
117
 
119
118
  def validate_sign():
120
- sign_app_val = sign.generate_signature(work_path.get_install_path('hylink-rpa-server.exe'))
121
- with open(work_path.get_install_path('hylink-rpa-server.sign')) as sign_file:
119
+ sign_app_val = sign.generate_signature(work_path.get_install_path('rpa-server.exe'))
120
+ with open(work_path.get_install_path('rpa-server.sign')) as sign_file:
122
121
  sign_file_val = sign_file.readline()
123
- if 'hylink-rpa-dev-sign' == sign_file_val.strip(): return
122
+ if 'rpa-dev-sign' == sign_file_val.strip(): return
124
123
  if sign_app_val != sign_file_val: raise Exception('程序签名验证失败!!!')
125
124
 
126
125
 
@@ -349,7 +348,7 @@ def sync_paddleocr_model():
349
348
  print('安装paddleocr模型文件结束')
350
349
 
351
350
 
352
- def clean_temp_dir(target_file='hylink_rpa_ident'):
351
+ def clean_temp_dir(target_file='rpa_ident'):
353
352
  root_folder = work_path.get_user_temp_path()
354
353
  print("Start clear cache...")
355
354
  for folder_name in os.listdir(root_folder):
@@ -22,7 +22,7 @@ class GlobalState:
22
22
  ]
23
23
  token = {}
24
24
 
25
- def init_app(context_path):
25
+ def init_app(context_path=None):
26
26
  app = Bottle()
27
27
  app.context_path = context_path
28
28
 
@@ -87,7 +87,7 @@ def rule(key):
87
87
  return decorated
88
88
  return return_func
89
89
 
90
- # annotation or plugins
90
+ # annotation or plugins, has auto install, don't need to call
91
91
  def params_resolve(func):
92
92
  @wraps(func)
93
93
  def decorated(*args, **kwargs):
@@ -4,12 +4,11 @@ from wsgiref.simple_server import WSGIServer, WSGIRequestHandler, make_server
4
4
  from bottle import ServerAdapter, Bottle, template, static_file
5
5
 
6
6
  """
7
- app = init_app('/doc_download')
7
+ app = bottle_web_base.init_app('子模块写 context_path, 主模块就不用写任何东西')
8
8
 
9
9
  @app.get('/queryList')
10
- @mvc.parameter_handler()
11
- @rule('DOC:DOWNLOAD')
12
- def query_list(params, pageInfo):
10
+ @bottle_web_base.rule('DOC:DOWNLOAD')
11
+ def query_list(params):
13
12
  """
14
13
 
15
14
  """
@@ -33,6 +33,9 @@ def _init():
33
33
  # 密码里的@ 要替换成 %40
34
34
  # sqlite connect_args={"check_same_thread": False} sqlite:///{}.format(db_url)
35
35
  def init_db(db_url: str, db_key: str='default', connect_args: dict={}, default_schema: str=None, pool_size: int=5, max_overflow: int=25, echo: bool=False):
36
+ if db_url.startswith('mysql'):
37
+ import pymysql
38
+ pymysql.install_as_MySQLdb()
36
39
  if inited_db.get(db_key): raise Exception('db {} already init!!!'.format(db_key))
37
40
  global engines, sessionMakers
38
41
  engine, sessionMaker = _create_connection(db_url=db_url, connect_args=connect_args, pool_size=pool_size, max_overflow=max_overflow, echo=echo)
@@ -5,7 +5,10 @@ __date__ = '2024/10/25 09:42'
5
5
 
6
6
  class DictWrapper(dict):
7
7
  def __getattr__(self, key):
8
- return self.get(key)
8
+ res = self.get(key)
9
+ if type(res) == dict:
10
+ return DictWrapper(res)
11
+ return res
9
12
 
10
13
  def __setattr__(self, key, value):
11
14
  self[key] = value
@@ -10,6 +10,9 @@ from jsonpath_ng import parser
10
10
  from ctools import cjson
11
11
  from ctools.sys_log import flog as log
12
12
 
13
+ """
14
+ douglas_rarefy.DouglasRarefy(res, level=3).sparse_points()
15
+ """
13
16
 
14
17
  class THIN_LEVEL:
15
18
  L1 = 0.00001
@@ -33,10 +33,3 @@ def table2list(html, include_header=True, recursive_find=True,
33
33
  row = [i.text for i in td]
34
34
  rows.append(row)
35
35
  return rows
36
-
37
-
38
- for e in table2list(open(r'C:\Users\hylink\Desktop\A-DESC.txt', encoding='utf-8'), table_attrs={'class_': '123'}):
39
- print(e)
40
-
41
- for e in table2list(open(r'C:\Users\hylink\Desktop\DEMO.txt', encoding='utf-8'), recursive_find=False, header_cell_tag='div', table_tag='div', table_class='table', row_tag='div', cell_tag='div'):
42
- print(e)
@@ -30,7 +30,7 @@ def data_layout(manifest: dict):
30
30
 
31
31
 
32
32
  def get_md5_sum(data):
33
- return hashlib.md5(data + "hylink-rpa".encode()).hexdigest()
33
+ return hashlib.md5(data + "gomyck-daning".encode()).hexdigest()
34
34
 
35
35
 
36
36
  def signature(manifest: dict):
@@ -1,7 +1,7 @@
1
1
  import hashlib
2
2
  import hmac
3
3
 
4
- global_key = 'hylink2014'
4
+ global_key = 'gomyck2014'
5
5
 
6
6
 
7
7
  def generate_signature(file_path, key: str = global_key):
@@ -4,8 +4,6 @@ import os
4
4
  import platform
5
5
  import socket
6
6
  import uuid
7
-
8
- import psutil
9
7
  from bottle import request
10
8
 
11
9
  from ctools import cjson, sm_tools, work_path
@@ -69,7 +67,7 @@ def get_origin_machine_code():
69
67
  0
70
68
  )
71
69
  disk_serial = str(volume_serial.value)
72
- combined_info = cpu_serial + disk_serial + '-hylink'
70
+ combined_info = cpu_serial + disk_serial + '-gomyck'
73
71
  return hashlib.md5(combined_info.encode()).hexdigest()
74
72
 
75
73
 
@@ -96,6 +94,7 @@ def get_remote_ipv4():
96
94
 
97
95
 
98
96
  def get_proc_pid_by(cmdline):
97
+ import psutil
99
98
  """
100
99
  根据命令行信息获取进程pid
101
100
  :param cmdline:
@@ -494,7 +494,7 @@ def excel_optimize(input_path: str):
494
494
 
495
495
 
496
496
  # 示例用法:从第1行到第5行、从第1列到第3列的区域复制到Word文档中
497
- # excel_file = r'C:\Users\DELL\hylink/hylink-rpa/document\test-2024-04-01_09-05-26.xlsx' # Excel文件名
497
+ # excel_file = r'C:\Users\DELL\xxx/xxx-rpa/document\test-2024-04-01_09-05-26.xlsx' # Excel文件名
498
498
  # excel_file_1 = r'E:\test\c.xlsx' # Excel文件名
499
499
  # excel_file_2 = r'E:\test\b.xlsx' # Excel文件名
500
500
  # word_file = r'E:\test\test.docx' # 输出Word文件名
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gomyck-tools
3
- Version: 1.1.6
3
+ Version: 1.1.8
4
4
  Summary: A ctools for python development by hao474798383
5
5
  Home-page: https://blog.gomyck.com
6
6
  Author: gomyck
@@ -16,7 +16,6 @@ Requires-Dist: chardet>=5.2.0
16
16
  Requires-Dist: psycopg2-binary>=2.9.9
17
17
  Requires-Dist: croniter>=3.0.3
18
18
  Requires-Dist: gmssl>=3.2.2
19
- Requires-Dist: psutil>=6.0.0
20
19
  Requires-Dist: jsonpath_ng>=1.6.1
21
20
  Requires-Dist: bottle==0.13.1
22
21
  Requires-Dist: requests==2.32.3
@@ -25,5 +24,6 @@ Requires-Dist: kafka-python==2.0.2
25
24
  Requires-Dist: bs4==0.0.2
26
25
  Requires-Dist: paho-mqtt==2.1.0
27
26
  Requires-Dist: fuzzywuzzy==0.18.0
27
+ Requires-Dist: pymysql==1.1.1
28
28
 
29
29
  this package is for python development
@@ -4,7 +4,6 @@ chardet>=5.2.0
4
4
  psycopg2-binary>=2.9.9
5
5
  croniter>=3.0.3
6
6
  gmssl>=3.2.2
7
- psutil>=6.0.0
8
7
  jsonpath_ng>=1.6.1
9
8
  bottle==0.13.1
10
9
  requests==2.32.3
@@ -13,3 +12,4 @@ kafka-python==2.0.2
13
12
  bs4==0.0.2
14
13
  paho-mqtt==2.1.0
15
14
  fuzzywuzzy==0.18.0
15
+ pymysql==1.1.1
@@ -11,7 +11,7 @@ requirements = parse_requirements(os.path.join(os.path.dirname(__file__), 'requi
11
11
 
12
12
  setup(
13
13
  name="gomyck-tools",
14
- version="1.1.6",
14
+ version="1.1.8",
15
15
  author="gomyck",
16
16
  author_email="hao474798383@163.com",
17
17
  description="A ctools for python development by hao474798383",
File without changes
File without changes
File without changes
File without changes
File without changes