ryry-cli 1.0__tar.gz → 1.2__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-1.0/ryry_cli.egg-info → ryry_cli-1.2}/PKG-INFO +3 -1
- ryry_cli-1.2/ryry/constant.py +5 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/ryry_widget.py +1 -1
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/upload.py +5 -42
- {ryry_cli-1.0 → ryry_cli-1.2/ryry_cli.egg-info}/PKG-INFO +3 -1
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry_cli.egg-info/requires.txt +2 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/setup.py +4 -2
- ryry_cli-1.0/ryry/constant.py +0 -5
- {ryry_cli-1.0 → ryry_cli-1.2}/LICENSE +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/README.md +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/__init__.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/main.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/ryry_service.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/script_template/main.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/script_template/run.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/server_func.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/store.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/task.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/taskUtils.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry/utils.py +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-1.0 → ryry_cli-1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ryry-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2
|
|
4
4
|
Summary: ryry tools
|
|
5
5
|
Home-page: https://github.com/dalipenMedia
|
|
6
6
|
Author: dalipen
|
|
@@ -27,6 +27,8 @@ Requires-Dist: urlparser
|
|
|
27
27
|
Requires-Dist: setuptools
|
|
28
28
|
Requires-Dist: twine
|
|
29
29
|
Requires-Dist: python-crontab
|
|
30
|
+
Requires-Dist: urllib3
|
|
31
|
+
Requires-Dist: requests_toolbelt
|
|
30
32
|
|
|
31
33
|
ryry Python Tool
|
|
32
34
|
===============================================
|
|
@@ -95,45 +95,8 @@ def upload(src, taskUUID, timeout=300):
|
|
|
95
95
|
needDeleteSrc, newSrc = transcode(src)
|
|
96
96
|
addtionExif(newSrc, taskUUID)
|
|
97
97
|
file_name = Path(newSrc).name
|
|
98
|
-
ossurl
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
headers['Content-Type'] = content_type
|
|
104
|
-
requests.adapters.DEFAULT_RETRIES = 3
|
|
105
|
-
s = requests.session()
|
|
106
|
-
s.keep_alive = False
|
|
107
|
-
res = s.put(ossurl, data=open(newSrc, 'rb').read(), headers=headers, timeout=timeout)
|
|
108
|
-
s.close()
|
|
109
|
-
if res.status_code == 200:
|
|
110
|
-
ossurl = additionalUrl(newSrc, ossurl)
|
|
111
|
-
if needDeleteSrc:
|
|
112
|
-
os.remove(newSrc)
|
|
113
|
-
return ossurl
|
|
114
|
-
else:
|
|
115
|
-
raise Exception(f"upload file fail! res = {res}")
|
|
116
|
-
|
|
117
|
-
def uploadWidget(src, widgetid, timeout=300):
|
|
118
|
-
from ryry import ryry_webapi
|
|
119
|
-
import requests
|
|
120
|
-
ossurl, content_type = ryry_webapi.GetWidgetOssUrl(widgetid)
|
|
121
|
-
if len(ossurl) == 0:
|
|
122
|
-
raise Exception("oss server is not avalid")
|
|
123
|
-
|
|
124
|
-
headers = dict()
|
|
125
|
-
headers['Content-Type'] = content_type
|
|
126
|
-
requests.adapters.DEFAULT_RETRIES = 3
|
|
127
|
-
s = requests.session()
|
|
128
|
-
s.keep_alive = False
|
|
129
|
-
res = s.put(ossurl, data=open(src, 'rb').read(), headers=headers, timeout=timeout)
|
|
130
|
-
s.close()
|
|
131
|
-
if res.status_code == 200:
|
|
132
|
-
ossurl = additionalUrl(src, ossurl)
|
|
133
|
-
checkid = ryry_webapi.WidgetUploadEnd(ossurl)
|
|
134
|
-
if checkid > 0:
|
|
135
|
-
return ossurl, checkid
|
|
136
|
-
else:
|
|
137
|
-
raise Exception("check fail!")
|
|
138
|
-
else:
|
|
139
|
-
raise Exception(f"upload file fail! res = {res}")
|
|
98
|
+
ossurl = ryry_webapi.upload(newSrc, os.path.splitext(file_name)[-1][1:])
|
|
99
|
+
ossurl = additionalUrl(newSrc, ossurl)
|
|
100
|
+
if needDeleteSrc:
|
|
101
|
+
os.remove(newSrc)
|
|
102
|
+
return ossurl
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ryry-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2
|
|
4
4
|
Summary: ryry tools
|
|
5
5
|
Home-page: https://github.com/dalipenMedia
|
|
6
6
|
Author: dalipen
|
|
@@ -27,6 +27,8 @@ Requires-Dist: urlparser
|
|
|
27
27
|
Requires-Dist: setuptools
|
|
28
28
|
Requires-Dist: twine
|
|
29
29
|
Requires-Dist: python-crontab
|
|
30
|
+
Requires-Dist: urllib3
|
|
31
|
+
Requires-Dist: requests_toolbelt
|
|
30
32
|
|
|
31
33
|
ryry Python Tool
|
|
32
34
|
===============================================
|
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
import subprocess
|
|
4
4
|
import datetime
|
|
5
5
|
|
|
6
|
-
ryry_version = "1.
|
|
6
|
+
ryry_version = "1.2"
|
|
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")
|
|
@@ -24,7 +24,7 @@ app_name="ryry-cli"
|
|
|
24
24
|
except:
|
|
25
25
|
with open(constanspy, 'w') as f:
|
|
26
26
|
f.write(f'''#!!!!! do not change this file !!!!!
|
|
27
|
-
app_version="1.
|
|
27
|
+
app_version="1.2"
|
|
28
28
|
app_bulld_number=1
|
|
29
29
|
app_bulld_anchor=""
|
|
30
30
|
app_name="ryry-cli"
|
|
@@ -65,6 +65,8 @@ setuptools.setup(
|
|
|
65
65
|
'setuptools',
|
|
66
66
|
'twine',
|
|
67
67
|
'python-crontab',
|
|
68
|
+
'urllib3',
|
|
69
|
+
'requests_toolbelt',
|
|
68
70
|
],
|
|
69
71
|
dependency_links=[],
|
|
70
72
|
entry_points={
|
ryry_cli-1.0/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
|