ryry-cli 2.39__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.39 → ryry_cli-2.41}/PKG-INFO +1 -1
- ryry_cli-2.41/ryry/constant.py +5 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/ryry_webapi.py +1 -1
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/ryry_widget.py +2 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/upload.py +44 -1
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry_cli.egg-info/PKG-INFO +1 -1
- {ryry_cli-2.39 → ryry_cli-2.41}/setup.py +1 -1
- ryry_cli-2.39/ryry/constant.py +0 -5
- {ryry_cli-2.39 → ryry_cli-2.41}/LICENSE +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/README.md +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/__init__.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/main.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/ryry_service.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/script_template/main.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/script_template/run.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/server_func.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/store.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/task.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/taskUtils.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry/utils.py +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-2.39 → ryry_cli-2.41}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-2.39 → 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)
|
|
@@ -180,6 +180,7 @@ def download(url, saveDir):
|
|
|
180
180
|
savePath = os.path.join(saveDir, f"{name}{ext}")
|
|
181
181
|
with open(savePath, 'wb') as f:
|
|
182
182
|
ftp.retrbinary(f'RETR {remote_filepath}', f.write)
|
|
183
|
+
return savePath
|
|
183
184
|
else:
|
|
184
185
|
if remote_filepath[-1:] != "/":
|
|
185
186
|
remote_filepath += "/"
|
|
@@ -190,6 +191,7 @@ def download(url, saveDir):
|
|
|
190
191
|
savePath = os.path.join(saveDir, f"{name}_{random_file}")
|
|
191
192
|
with open(savePath, 'wb') as f:
|
|
192
193
|
ftp.retrbinary(f'RETR {random_file}', f.write)
|
|
194
|
+
return savePath
|
|
193
195
|
ftp.quit()
|
|
194
196
|
else:
|
|
195
197
|
print(f"download fail: domain {host} not support")
|
|
@@ -200,6 +202,8 @@ def download(url, saveDir):
|
|
|
200
202
|
s.headers.update({'Connection':'close'})
|
|
201
203
|
ua = UserAgent()
|
|
202
204
|
file = s.get(url, verify=False, headers={'User-Agent': ua.random}, timeout=30)
|
|
205
|
+
ext = urlparser.urlparse(url).path[urlparser.urlparse(url).path.index("."):]
|
|
206
|
+
savePath = os.path.join(saveDir, f"{name}{ext}")
|
|
203
207
|
if os.path.exists(savePath):
|
|
204
208
|
os.remove(savePath)
|
|
205
209
|
with open(savePath, "wb") as c:
|
|
@@ -215,5 +219,44 @@ def download(url, saveDir):
|
|
|
215
219
|
print(f"download fail: {e}")
|
|
216
220
|
return None
|
|
217
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
|
+
|
|
218
261
|
# url = upload("D:\\0505.mp4", "111", 300)
|
|
219
|
-
# download("ftp://192.168.3.220/1TB01/data/mcn/
|
|
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.39/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
|