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.
- {ryry_cli-2.57/ryry_cli.egg-info → ryry-cli-2.59}/PKG-INFO +56 -70
- ryry-cli-2.59/ryry/constant.py +4 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/ryry_widget.py +5 -3
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/server_func.py +1 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/taskUtils.py +13 -1
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/upload.py +0 -3
- {ryry_cli-2.57 → ryry-cli-2.59/ryry_cli.egg-info}/PKG-INFO +56 -70
- {ryry_cli-2.57 → ryry-cli-2.59}/setup.cfg +4 -4
- {ryry_cli-2.57 → ryry-cli-2.59}/setup.py +1 -1
- ryry_cli-2.57/ryry/constant.py +0 -4
- {ryry_cli-2.57 → ryry-cli-2.59}/LICENSE +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/README.md +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/__init__.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/main.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/ryry_service.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/script_template/main.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/script_template/run.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/store.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/task.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry/utils.py +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-2.57 → ryry-cli-2.59}/ryry_cli.egg-info/requires.txt +0 -0
- {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.
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
@@ -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
|
-
|
|
337
|
-
if is_block == False and os.path.exists(
|
|
338
|
-
data = GetWidgetConfig(
|
|
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.
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
+
|
ryry_cli-2.57/ryry/constant.py
DELETED
|
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
|
|
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
|