ryry-cli 2.40__tar.gz → 2.41__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.40 → ryry_cli-2.41}/PKG-INFO +1 -1
- ryry_cli-2.41/ryry/constant.py +5 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/ryry_webapi.py +1 -1
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/ryry_widget.py +2 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/upload.py +39 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry_cli.egg-info/PKG-INFO +1 -1
- {ryry_cli-2.40 → ryry_cli-2.41}/setup.py +1 -1
- ryry_cli-2.40/ryry/constant.py +0 -5
- {ryry_cli-2.40 → ryry_cli-2.41}/LICENSE +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/README.md +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/__init__.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/main.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/ryry_service.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/script_template/main.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/script_template/run.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/server_func.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/store.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/task.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/taskUtils.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry/utils.py +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-2.40 → ryry_cli-2.41}/setup.cfg +0 -0
|
@@ -196,7 +196,7 @@ def uploadWidget(widget_id, name, whl, ext, version):
|
|
|
196
196
|
'version':version,
|
|
197
197
|
'ext':ext
|
|
198
198
|
}
|
|
199
|
-
r1, r2, r3 = _aigc_post("aigc/task/publishWidget", params, files=files, timeout=
|
|
199
|
+
r1, r2, r3 = _aigc_post("aigc/task/publishWidget", params, files=files, timeout=300)
|
|
200
200
|
if r1 != 0:
|
|
201
201
|
raise Exception(f"upload widget fail!, reason={r2}")
|
|
202
202
|
return r3
|
|
@@ -168,6 +168,7 @@ def addWidgetToEnv(root, mute=False):
|
|
|
168
168
|
version = package.version
|
|
169
169
|
root = os.path.join(package.location, name.replace("-", "_"))
|
|
170
170
|
except:
|
|
171
|
+
root = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), name.replace("-", "_"))
|
|
171
172
|
pass
|
|
172
173
|
print(root)
|
|
173
174
|
if CheckWidgetDataInPath(root) == False:
|
|
@@ -420,6 +421,7 @@ def installWidget(name):
|
|
|
420
421
|
local_version = _local_package_version(name)
|
|
421
422
|
if compare_versions(remote_version, local_version) > 0:
|
|
422
423
|
#update
|
|
424
|
+
print(f"install -> {package_url}")
|
|
423
425
|
pipReInstall(name, package_url)
|
|
424
426
|
widgetInstallNotify(name, remote_version)
|
|
425
427
|
addWidgetToEnv(name)
|
|
@@ -219,5 +219,44 @@ def download(url, saveDir):
|
|
|
219
219
|
print(f"download fail: {e}")
|
|
220
220
|
return None
|
|
221
221
|
|
|
222
|
+
def downloadDir(url, saveDir):
|
|
223
|
+
import uuid, os
|
|
224
|
+
if len(url) <= 0:
|
|
225
|
+
return None
|
|
226
|
+
try:
|
|
227
|
+
name = ''.join(str(uuid.uuid4()).split('-'))
|
|
228
|
+
|
|
229
|
+
if url.startswith("ftp"):
|
|
230
|
+
import ftplib, random
|
|
231
|
+
parsed_url = urlparse(url)
|
|
232
|
+
host = parsed_url.hostname
|
|
233
|
+
if host in SUBDOMAIN:
|
|
234
|
+
ip = SUBDOMAIN[host]["host"]
|
|
235
|
+
username = SUBDOMAIN[host]["username"]
|
|
236
|
+
password = SUBDOMAIN[host]["password"]
|
|
237
|
+
ftp = ftplib.FTP(ip, timeout=3)
|
|
238
|
+
ftp.login(username, password)
|
|
239
|
+
|
|
240
|
+
remote_filepath = parsed_url.path[1:]
|
|
241
|
+
if remote_filepath[-1:] != "/":
|
|
242
|
+
remote_filepath += "/"
|
|
243
|
+
ftp.cwd(remote_filepath)
|
|
244
|
+
files = ftp.nlst()
|
|
245
|
+
savePath = os.path.join(saveDir, f"{name}")
|
|
246
|
+
if os.path.exists(savePath) == False:
|
|
247
|
+
os.makedirs(savePath)
|
|
248
|
+
for file in files:
|
|
249
|
+
with open(os.path.join(savePath, file), 'wb') as f:
|
|
250
|
+
ftp.retrbinary(f'RETR {file}', f.write)
|
|
251
|
+
ftp.quit()
|
|
252
|
+
return savePath
|
|
253
|
+
else:
|
|
254
|
+
print(f"downloadDir fail: domain {host} not support")
|
|
255
|
+
else:
|
|
256
|
+
print(f"url {url} not support")
|
|
257
|
+
except Exception as e:
|
|
258
|
+
print(f"downloadDir fail: {e}")
|
|
259
|
+
return None
|
|
260
|
+
|
|
222
261
|
# url = upload("D:\\0505.mp4", "111", 300)
|
|
223
262
|
# download("ftp://192.168.3.220/1TB01/data/mcn/digital_male_1", "E:\\semi-automatic_mixed_video-main\\task_system\\widget\\gen_template_video\\.temp")
|
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
import subprocess
|
|
4
4
|
import datetime
|
|
5
5
|
|
|
6
|
-
ryry_version = "2.
|
|
6
|
+
ryry_version = "2.41"
|
|
7
7
|
ryry_build_number = int(ryry_version.replace(".",""))
|
|
8
8
|
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
|
9
9
|
constanspy = os.path.join(cur_dir, "ryry", "constant.py")
|
ryry_cli-2.40/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
|
|
File without changes
|
|
File without changes
|