ryry-cli 2.57__tar.gz → 2.59__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 (28) hide show
  1. {ryry_cli-2.57/ryry_cli.egg-info → ryry-cli-2.59}/PKG-INFO +56 -70
  2. ryry-cli-2.59/ryry/constant.py +4 -0
  3. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/ryry_widget.py +5 -3
  4. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/server_func.py +1 -0
  5. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/taskUtils.py +13 -1
  6. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/upload.py +0 -3
  7. {ryry_cli-2.57 → ryry-cli-2.59/ryry_cli.egg-info}/PKG-INFO +56 -70
  8. {ryry_cli-2.57 → ryry-cli-2.59}/setup.cfg +4 -4
  9. {ryry_cli-2.57 → ryry-cli-2.59}/setup.py +1 -1
  10. ryry_cli-2.57/ryry/constant.py +0 -4
  11. {ryry_cli-2.57 → ryry-cli-2.59}/LICENSE +0 -0
  12. {ryry_cli-2.57 → ryry-cli-2.59}/README.md +0 -0
  13. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/__init__.py +0 -0
  14. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/main.py +0 -0
  15. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/ryry_server_socket.py +0 -0
  16. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/ryry_service.py +0 -0
  17. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/ryry_webapi.py +0 -0
  18. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/script_template/__init__.py +0 -0
  19. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/script_template/main.py +0 -0
  20. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/script_template/run.py +0 -0
  21. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/store.py +0 -0
  22. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/task.py +0 -0
  23. {ryry_cli-2.57 → ryry-cli-2.59}/ryry/utils.py +0 -0
  24. {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/SOURCES.txt +0 -0
  25. {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/dependency_links.txt +0 -0
  26. {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/entry_points.txt +0 -0
  27. {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/requires.txt +0 -0
  28. {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/top_level.txt +0 -0
@@ -1,70 +1,56 @@
1
- Metadata-Version: 2.1
2
- Name: ryry-cli
3
- Version: 2.57
4
- Summary: ryry tools
5
- Home-page: https://github.com/dalipenMedia
6
- Author: dalipen
7
- Author-email: dalipen01@gmail.com
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.4
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: requests
15
- Requires-Dist: uuid
16
- Requires-Dist: Image
17
- Requires-Dist: pillow
18
- Requires-Dist: psutil
19
- Requires-Dist: pynvml
20
- Requires-Dist: requests_toolbelt
21
- Requires-Dist: matplotlib
22
- Requires-Dist: fake_useragent
23
- Requires-Dist: piexif
24
- Requires-Dist: gputil
25
- Requires-Dist: urlparser
26
- Requires-Dist: python-crontab
27
- Requires-Dist: urllib3
28
-
29
- ryry Python Tool
30
- ===============================================
31
- The ryry Python Tool is a official tool, you can use it to **Register** device to ryry server, other person can use **ryry Application** assign tasks to you for implementation
32
-
33
- Installation
34
- ------------
35
-
36
- The ryry requires [Python](http://www.python.org/download) 3.10.6 or later.
37
-
38
- ##### Installing
39
- pip install ryry-cli
40
-
41
- ##### Uninstalling
42
- pip uninstall ryry-cli
43
-
44
- Use
45
- ------------
46
- ##### 1. Running
47
- $ ryry service start
48
- start a process to wait for the server to issue tasks. **Please do not close it**
49
-
50
- Module Developer
51
- ------------
52
- $ ryry widget init
53
-
54
- in empty folder, use above command craete a ryry module, structure is like
55
-
56
- [widget folder]
57
- |-- config.json //*required, do not change*
58
- |-- main.py //*required, do not change*
59
- |-- run.py
60
-
61
- if other person share widget code to you , you can add widget path in your computer to ryry environment
62
-
63
- $ ryry widget add [path_with_widget_code]
64
-
65
- you can modify script and h5 file yourself, then publish to ryry sever
66
-
67
- $ ryry widget publish
68
-
69
- get ryry status
70
- $ ryry services status
1
+ Metadata-Version: 2.1
2
+ Name: ryry-cli
3
+ Version: 2.59
4
+ Summary: ryry tools
5
+ Home-page: https://github.com/dalipenMedia
6
+ Author: dalipen
7
+ Author-email: dalipen01@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.4
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+
15
+ ryry Python Tool
16
+ ===============================================
17
+ The ryry Python Tool is a official tool, you can use it to **Register** device to ryry server, other person can use **ryry Application** assign tasks to you for implementation
18
+
19
+ Installation
20
+ ------------
21
+
22
+ The ryry requires [Python](http://www.python.org/download) 3.10.6 or later.
23
+
24
+ ##### Installing
25
+ pip install ryry-cli
26
+
27
+ ##### Uninstalling
28
+ pip uninstall ryry-cli
29
+
30
+ Use
31
+ ------------
32
+ ##### 1. Running
33
+ $ ryry service start
34
+ start a process to wait for the server to issue tasks. **Please do not close it**
35
+
36
+ Module Developer
37
+ ------------
38
+ $ ryry widget init
39
+
40
+ in empty folder, use above command craete a ryry module, structure is like
41
+
42
+ [widget folder]
43
+ |-- config.json //*required, do not change*
44
+ |-- main.py //*required, do not change*
45
+ |-- run.py
46
+
47
+ if other person share widget code to you , you can add widget path in your computer to ryry environment
48
+
49
+ $ ryry widget add [path_with_widget_code]
50
+
51
+ you can modify script and h5 file yourself, then publish to ryry sever
52
+
53
+ $ ryry widget publish
54
+
55
+ get ryry status
56
+ $ ryry services status
@@ -0,0 +1,4 @@
1
+ #!!!!! do not change this file !!!!!
2
+ app_version="2.59"
3
+ app_bulld_anchor="Noh_2024-09-23 17:45:28.815580"
4
+ app_name="ryry-cli"
@@ -320,6 +320,8 @@ def widgetReInstall(name, url, local_path):
320
320
  if os.path.exists(requirements_file):
321
321
  subprocess.run(f"{pip_cmd} install -r {requirements_file} -i https://pypi.python.org/simple/",
322
322
  stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
323
+ except Exception as ex:
324
+ print(ex)
323
325
  finally:
324
326
  if os.path.exists(download_file):
325
327
  os.remove(download_file)
@@ -333,9 +335,9 @@ def UpdateWidgetFromPypi():
333
335
  path = _map[it]["path"]
334
336
  else:
335
337
  path = _map[it]
336
- path = os.path.dirname(path)
337
- if is_block == False and os.path.exists(path):
338
- data = GetWidgetConfig(path)
338
+ local_path = os.path.dirname(path)
339
+ if is_block == False and os.path.exists(local_path):
340
+ data = GetWidgetConfig(local_path)
339
341
  if "name" in data and len(data["name"]) > 0:
340
342
  try:
341
343
  py_package = data["name"]
@@ -46,6 +46,7 @@ class TaskThread(Thread):
46
46
  if cmd:
47
47
  self.checkUUID = "local_" + ''.join(str(uuid.uuid4()).split('-'))
48
48
  self.params["task_id"] = self.checkUUID
49
+ taskUtils.appendTaskAndDomain(self.checkUUID, self.param["domain"])
49
50
  executeSuccess, result_obj = task.executeLocalPython(self.checkUUID, cmd, self.params, self.timeout)
50
51
  if executeSuccess and result_obj["status"] == 0:
51
52
  self.call_back(self.idx, result_obj["result"])
@@ -26,7 +26,19 @@ def taskDomainWithUUID(taskUUID):
26
26
  if taskUUID in task_config:
27
27
  return task_config[taskUUID]["domain"]
28
28
  return ""
29
-
29
+ def appendTaskAndDomain(taskUUID, subDomain):
30
+ task_config = {}
31
+ if os.path.exists(task_config_file):
32
+ with open(task_config_file, 'r') as f:
33
+ task_config = json.load(f)
34
+ task_config[taskUUID] = {
35
+ "pts": calendar.timegm(time.gmtime()),
36
+ "domain": subDomain
37
+ }
38
+ task_config["last_task_pts"] = task_config[taskUUID]["pts"]
39
+ with open(task_config_file, 'w') as f:
40
+ json.dump(task_config, f)
41
+
30
42
  WECHAT_URL = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=f40c5fb0-2734-48b0-a2d0-0faedf7dd2e4"
31
43
  def uploadFile2Wechat(filepath):
32
44
  real_robot_url = WECHAT_URL
@@ -261,6 +261,3 @@ def downloadDir(url, saveDir, useCount=-1, autoDelete=False):
261
261
  except Exception as e:
262
262
  print(f"downloadDir fail: {e}")
263
263
  return None
264
-
265
- # url = upload("D:\\0505.mp4", "111", 300)
266
- # download("http://w.hs1921.com/skin/wywk/images/img_weixin.jpg", "C:\\Users\\123\\Downloads\\test")
@@ -1,70 +1,56 @@
1
- Metadata-Version: 2.1
2
- Name: ryry-cli
3
- Version: 2.57
4
- Summary: ryry tools
5
- Home-page: https://github.com/dalipenMedia
6
- Author: dalipen
7
- Author-email: dalipen01@gmail.com
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.4
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: requests
15
- Requires-Dist: uuid
16
- Requires-Dist: Image
17
- Requires-Dist: pillow
18
- Requires-Dist: psutil
19
- Requires-Dist: pynvml
20
- Requires-Dist: requests_toolbelt
21
- Requires-Dist: matplotlib
22
- Requires-Dist: fake_useragent
23
- Requires-Dist: piexif
24
- Requires-Dist: gputil
25
- Requires-Dist: urlparser
26
- Requires-Dist: python-crontab
27
- Requires-Dist: urllib3
28
-
29
- ryry Python Tool
30
- ===============================================
31
- The ryry Python Tool is a official tool, you can use it to **Register** device to ryry server, other person can use **ryry Application** assign tasks to you for implementation
32
-
33
- Installation
34
- ------------
35
-
36
- The ryry requires [Python](http://www.python.org/download) 3.10.6 or later.
37
-
38
- ##### Installing
39
- pip install ryry-cli
40
-
41
- ##### Uninstalling
42
- pip uninstall ryry-cli
43
-
44
- Use
45
- ------------
46
- ##### 1. Running
47
- $ ryry service start
48
- start a process to wait for the server to issue tasks. **Please do not close it**
49
-
50
- Module Developer
51
- ------------
52
- $ ryry widget init
53
-
54
- in empty folder, use above command craete a ryry module, structure is like
55
-
56
- [widget folder]
57
- |-- config.json //*required, do not change*
58
- |-- main.py //*required, do not change*
59
- |-- run.py
60
-
61
- if other person share widget code to you , you can add widget path in your computer to ryry environment
62
-
63
- $ ryry widget add [path_with_widget_code]
64
-
65
- you can modify script and h5 file yourself, then publish to ryry sever
66
-
67
- $ ryry widget publish
68
-
69
- get ryry status
70
- $ ryry services status
1
+ Metadata-Version: 2.1
2
+ Name: ryry-cli
3
+ Version: 2.59
4
+ Summary: ryry tools
5
+ Home-page: https://github.com/dalipenMedia
6
+ Author: dalipen
7
+ Author-email: dalipen01@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.4
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+
15
+ ryry Python Tool
16
+ ===============================================
17
+ The ryry Python Tool is a official tool, you can use it to **Register** device to ryry server, other person can use **ryry Application** assign tasks to you for implementation
18
+
19
+ Installation
20
+ ------------
21
+
22
+ The ryry requires [Python](http://www.python.org/download) 3.10.6 or later.
23
+
24
+ ##### Installing
25
+ pip install ryry-cli
26
+
27
+ ##### Uninstalling
28
+ pip uninstall ryry-cli
29
+
30
+ Use
31
+ ------------
32
+ ##### 1. Running
33
+ $ ryry service start
34
+ start a process to wait for the server to issue tasks. **Please do not close it**
35
+
36
+ Module Developer
37
+ ------------
38
+ $ ryry widget init
39
+
40
+ in empty folder, use above command craete a ryry module, structure is like
41
+
42
+ [widget folder]
43
+ |-- config.json //*required, do not change*
44
+ |-- main.py //*required, do not change*
45
+ |-- run.py
46
+
47
+ if other person share widget code to you , you can add widget path in your computer to ryry environment
48
+
49
+ $ ryry widget add [path_with_widget_code]
50
+
51
+ you can modify script and h5 file yourself, then publish to ryry sever
52
+
53
+ $ ryry widget publish
54
+
55
+ get ryry status
56
+ $ ryry services status
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -3,7 +3,7 @@ import os
3
3
  import subprocess
4
4
  import datetime
5
5
 
6
- ryry_version = "2.57"
6
+ ryry_version = "2.59"
7
7
  cur_dir = os.path.dirname(os.path.abspath(__file__))
8
8
  constanspy = os.path.join(cur_dir, "ryry", "constant.py")
9
9
  try:
@@ -1,4 +0,0 @@
1
- #!!!!! do not change this file !!!!!
2
- app_version="2.57"
3
- app_bulld_anchor="Noh_2024-09-14 17:24:55.827020"
4
- app_name="ryry-cli"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes