ryry-cli 4.31__tar.gz → 5.1__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-4.31/ryry_cli.egg-info → ryry_cli-5.1}/PKG-INFO +2 -2
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/constant.py +2 -2
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/main.py +2 -2
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/store.py +1 -1
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/upload.py +27 -11
- {ryry_cli-4.31 → ryry_cli-5.1/ryry_cli.egg-info}/PKG-INFO +2 -2
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry_cli.egg-info/requires.txt +1 -1
- {ryry_cli-4.31 → ryry_cli-5.1}/setup.py +2 -2
- {ryry_cli-4.31 → ryry_cli-5.1}/LICENSE +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/README.md +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/__init__.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/daemon_base.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/daemon_manager.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/proxy_manager.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/ryry_service.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/ryry_widget.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/script_template/daemon.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/script_template/main.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/script_template/run.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/server_func.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/shared_memory.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/task.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/taskUtils.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry/utils.py +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-4.31 → ryry_cli-5.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ryry-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.1
|
|
4
4
|
Summary: ryry tools
|
|
5
5
|
Home-page: https://github.com/dalipenMedia
|
|
6
6
|
Author: dalipen
|
|
@@ -25,7 +25,7 @@ Requires-Dist: urllib3
|
|
|
25
25
|
Requires-Dist: portalocker
|
|
26
26
|
Requires-Dist: PyYAML
|
|
27
27
|
Provides-Extra: with-mecord
|
|
28
|
-
Requires-Dist: mecord-cli>=0.7.
|
|
28
|
+
Requires-Dist: mecord-cli>=0.7.407; extra == "with-mecord"
|
|
29
29
|
|
|
30
30
|
ryry Python Tool
|
|
31
31
|
===============================================
|
|
@@ -207,8 +207,8 @@ def status():
|
|
|
207
207
|
service_status(None, 0)
|
|
208
208
|
print(scr_line("-" * ll*3))
|
|
209
209
|
device_status(None, 0)
|
|
210
|
-
print(scr_line("-" * ll*3))
|
|
211
|
-
proxy_status(None, 0)
|
|
210
|
+
# print(scr_line("-" * ll*3))
|
|
211
|
+
# proxy_status(None, 0)
|
|
212
212
|
print(scr_line("-" * ll*3))
|
|
213
213
|
widget_status(None, 0)
|
|
214
214
|
print(scr_line("-" * ll*3))
|
|
@@ -155,7 +155,7 @@ def extend():
|
|
|
155
155
|
_genExtend()
|
|
156
156
|
elif read_data["extend"].get("device_id", "") != read_data.get("deviceInfo", {}).get("device_id", ""):
|
|
157
157
|
_genExtend()
|
|
158
|
-
elif read_data["extend"].get("app", "") == "ryry-cli
|
|
158
|
+
elif read_data["extend"].get("app", "") == "ryry-cli 5.1":
|
|
159
159
|
_genExtend()
|
|
160
160
|
else:
|
|
161
161
|
_genExtend()
|
|
@@ -114,14 +114,14 @@ def uploadByDomain(src, targetDomain, taskUUID, keepItAlways=False, uploadPath=N
|
|
|
114
114
|
|
|
115
115
|
if upload_path:
|
|
116
116
|
if "mnt/NAS/mcn" in upload_path or "aigc_output/" in upload_path:
|
|
117
|
-
ftp_config = getFtpConfig("
|
|
117
|
+
ftp_config = getFtpConfig("219.136.123.179")
|
|
118
118
|
return ftpUpload(src, file_name, ftp_config, upload_path)
|
|
119
119
|
elif (targetDomain != None and"aigc_output/" in targetDomain):
|
|
120
|
-
ftp_config = getFtpConfig("
|
|
120
|
+
ftp_config = getFtpConfig("219.136.123.179")
|
|
121
121
|
return ftpUpload(src, file_name, ftp_config, upload_path)
|
|
122
122
|
elif (targetDomain == None or len(targetDomain) <= 0) and (uploadPath and len(uploadPath) > 0):
|
|
123
123
|
#找不到domain,但是有uploadPath的情况下,默认走ftp
|
|
124
|
-
ftp_config = getFtpConfig("
|
|
124
|
+
ftp_config = getFtpConfig("219.136.123.179")
|
|
125
125
|
return ftpUpload(src, file_name, ftp_config, upload_path)
|
|
126
126
|
|
|
127
127
|
from ryry import ryry_webapi
|
|
@@ -215,6 +215,22 @@ def ftpUpload(file, new_file_name, subdomain, upload_path=""):
|
|
|
215
215
|
import ftplib
|
|
216
216
|
while retry < 3:
|
|
217
217
|
try:
|
|
218
|
+
#如果ip是外网ip,并且在FTP_REPLACEMENT内有,则先替换成内网ip上传一次
|
|
219
|
+
if retry == 0 and "192.168" not in ip and ip in FTP_REPLACEMENT:
|
|
220
|
+
try:
|
|
221
|
+
local_network_config = DOMAIN_CONFIG[FTP_REPLACEMENT[ip]]["config"]
|
|
222
|
+
ftp = ftplib.FTP()
|
|
223
|
+
ftp.connect(local_network_config["host"], local_network_config["port"], timeout=5)
|
|
224
|
+
ftp.login(local_network_config["username"], local_network_config["password"])
|
|
225
|
+
if upload_path:
|
|
226
|
+
s = deepFtpUpload(file, new_file_name, ftp, upload_path, readpath)
|
|
227
|
+
else:
|
|
228
|
+
s = deepFtpUpload(file, new_file_name, ftp, writepath, readpath)
|
|
229
|
+
ftp.quit()
|
|
230
|
+
return s
|
|
231
|
+
except:
|
|
232
|
+
pass
|
|
233
|
+
|
|
218
234
|
if retry > 0:
|
|
219
235
|
has_bak = FTP_REPLACEMENT.get(ip, None)
|
|
220
236
|
if has_bak:
|
|
@@ -279,15 +295,15 @@ ftp_192_168_50_12={
|
|
|
279
295
|
"username" : "mcn",
|
|
280
296
|
"password" : "meco@2024+",
|
|
281
297
|
"writepath" : "cache",
|
|
282
|
-
"readpath" : "ftp://
|
|
298
|
+
"readpath" : "ftp://219.136.123.179/mnt/NAS/mcn"
|
|
283
299
|
}
|
|
284
300
|
ftp_183_6_90_205={
|
|
285
|
-
"host" : "
|
|
301
|
+
"host" : "219.136.123.179",
|
|
286
302
|
"port": 2221,
|
|
287
303
|
"username" : "mcn",
|
|
288
304
|
"password" : "meco@2024+",
|
|
289
305
|
"writepath" : "cache",
|
|
290
|
-
"readpath" : "ftp://
|
|
306
|
+
"readpath" : "ftp://219.136.123.179/mnt/NAS/mcn"
|
|
291
307
|
}
|
|
292
308
|
|
|
293
309
|
from ryry import utils
|
|
@@ -329,9 +345,9 @@ def get_domain_config(target_domain):
|
|
|
329
345
|
|
|
330
346
|
DOMAIN_CONFIG = {
|
|
331
347
|
"192.168.50.12": {"type": "ftp", "config": ftp_192_168_50_12},
|
|
332
|
-
"
|
|
348
|
+
"219.136.123.179": {"type": "ftp", "config": ftp_183_6_90_205},
|
|
333
349
|
"ftp://192.168.50.12/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_192_168_50_12},
|
|
334
|
-
"ftp://
|
|
350
|
+
"ftp://219.136.123.179/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_183_6_90_205},
|
|
335
351
|
"res.zjtemplate.com": {"type": "oss", "config": oss_res_config},
|
|
336
352
|
"upload.zjtemplate.com": {"type": "oss", "config": oss_upload_config},
|
|
337
353
|
"oss.zjtemplate.com": {"type": "oss", "config": oss_template_config},
|
|
@@ -340,12 +356,12 @@ DOMAIN_CONFIG = {
|
|
|
340
356
|
}
|
|
341
357
|
|
|
342
358
|
FTP_REPLACEMENT = {
|
|
343
|
-
"192.168.50.12": "
|
|
344
|
-
"
|
|
359
|
+
"192.168.50.12": "219.136.123.179",
|
|
360
|
+
"219.136.123.179": "192.168.50.12",
|
|
345
361
|
}
|
|
346
362
|
|
|
347
363
|
SUBDOMAIN = {
|
|
348
|
-
"
|
|
364
|
+
"219.136.123.179": [
|
|
349
365
|
ftp_192_168_50_12,
|
|
350
366
|
ftp_183_6_90_205,
|
|
351
367
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ryry-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.1
|
|
4
4
|
Summary: ryry tools
|
|
5
5
|
Home-page: https://github.com/dalipenMedia
|
|
6
6
|
Author: dalipen
|
|
@@ -25,7 +25,7 @@ Requires-Dist: urllib3
|
|
|
25
25
|
Requires-Dist: portalocker
|
|
26
26
|
Requires-Dist: PyYAML
|
|
27
27
|
Provides-Extra: with-mecord
|
|
28
|
-
Requires-Dist: mecord-cli>=0.7.
|
|
28
|
+
Requires-Dist: mecord-cli>=0.7.407; extra == "with-mecord"
|
|
29
29
|
|
|
30
30
|
ryry Python Tool
|
|
31
31
|
===============================================
|
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
import subprocess
|
|
4
4
|
import datetime
|
|
5
5
|
|
|
6
|
-
ryry_version = "
|
|
6
|
+
ryry_version = "5.1"
|
|
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:
|
|
@@ -73,7 +73,7 @@ setuptools.setup(
|
|
|
73
73
|
'PyYAML'
|
|
74
74
|
],
|
|
75
75
|
extras_require={
|
|
76
|
-
'with_mecord': ['mecord-cli>=0.7.
|
|
76
|
+
'with_mecord': ['mecord-cli>=0.7.407'],
|
|
77
77
|
},
|
|
78
78
|
dependency_links=[],
|
|
79
79
|
entry_points={
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|