rclone-api 1.5.1__py2.py3-none-any.whl → 1.5.3__py2.py3-none-any.whl
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.
- rclone_api/__init__.py +17 -0
- rclone_api/install.py +4 -1
- rclone_api/util.py +5 -0
- {rclone_api-1.5.1.dist-info → rclone_api-1.5.3.dist-info}/METADATA +1 -1
- {rclone_api-1.5.1.dist-info → rclone_api-1.5.3.dist-info}/RECORD +9 -9
- {rclone_api-1.5.1.dist-info → rclone_api-1.5.3.dist-info}/LICENSE +0 -0
- {rclone_api-1.5.1.dist-info → rclone_api-1.5.3.dist-info}/WHEEL +0 -0
- {rclone_api-1.5.1.dist-info → rclone_api-1.5.3.dist-info}/entry_points.txt +0 -0
- {rclone_api-1.5.1.dist-info → rclone_api-1.5.3.dist-info}/top_level.txt +0 -0
rclone_api/__init__.py
CHANGED
@@ -74,6 +74,23 @@ class Rclone:
|
|
74
74
|
implementation details and providing a clean, consistent interface.
|
75
75
|
"""
|
76
76
|
|
77
|
+
@staticmethod
|
78
|
+
def upgrade_rclone() -> Path:
|
79
|
+
"""
|
80
|
+
Upgrade the rclone executable to the latest version.
|
81
|
+
|
82
|
+
Downloads the latest rclone binary and replaces the current one.
|
83
|
+
|
84
|
+
If an external rclone is already in your path then although upgrade_rclone
|
85
|
+
will download the latest version, it will not affect the rclone selected.
|
86
|
+
|
87
|
+
Returns:
|
88
|
+
Path to the upgraded rclone executable
|
89
|
+
"""
|
90
|
+
from rclone_api.util import upgrade_rclone
|
91
|
+
|
92
|
+
return upgrade_rclone()
|
93
|
+
|
77
94
|
def __init__(
|
78
95
|
self, rclone_conf: Path | Config, rclone_exe: Path | None = None
|
79
96
|
) -> None:
|
rclone_api/install.py
CHANGED
@@ -70,16 +70,19 @@ def _find_rclone_exe(start: Path) -> Path | None:
|
|
70
70
|
|
71
71
|
|
72
72
|
def rclone_download(out: Path, replace=False) -> Exception | None:
|
73
|
+
if out.exists() and not replace:
|
74
|
+
return None
|
73
75
|
try:
|
74
76
|
url = rclone_download_url()
|
75
77
|
with TemporaryDirectory() as tmpdir:
|
76
78
|
tmp = Path(tmpdir)
|
77
|
-
download(url, tmp, kind="zip", replace=
|
79
|
+
download(url, tmp, kind="zip", replace=True)
|
78
80
|
exe = _find_rclone_exe(tmp)
|
79
81
|
if exe is None:
|
80
82
|
raise FileNotFoundError("rclone executable not found")
|
81
83
|
if os.path.exists(out):
|
82
84
|
os.remove(out)
|
85
|
+
out.parent.mkdir(parents=True, exist_ok=True)
|
83
86
|
shutil.move(exe, out)
|
84
87
|
_remove_signed_binary_requirements(out)
|
85
88
|
_make_executable(out)
|
rclone_api/util.py
CHANGED
@@ -167,6 +167,11 @@ def get_rclone_exe(rclone_exe: Path | None) -> Path:
|
|
167
167
|
return rclone_exe
|
168
168
|
|
169
169
|
|
170
|
+
def upgrade_rclone() -> Path:
|
171
|
+
rclone_download(out=_RCLONE_EXE, replace=True)
|
172
|
+
return _RCLONE_EXE
|
173
|
+
|
174
|
+
|
170
175
|
def rclone_execute(
|
171
176
|
cmd: list[str],
|
172
177
|
rclone_conf: Path | Config,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
rclone_api/__init__.py,sha256=
|
1
|
+
rclone_api/__init__.py,sha256=lh_dJHiXVGqgrOcorUBu9cBy76e1W62YYmhiM7cuM78,32228
|
2
2
|
rclone_api/cli.py,sha256=dibfAZIh0kXWsBbfp3onKLjyZXo54mTzDjUdzJlDlWo,231
|
3
3
|
rclone_api/completed_process.py,sha256=_IZ8IWK7DM1_tsbDEkH6wPZ-bbcrgf7A7smls854pmg,1775
|
4
4
|
rclone_api/config.py,sha256=f6jEAxVorGFr31oHfcsu5AJTtOJj2wR5tTSsbGGZuIw,2558
|
@@ -15,7 +15,7 @@ rclone_api/file_stream.py,sha256=_W3qnwCuigqA0hzXl2q5pAxSZDRaUSwet4BkT0lpnzs,143
|
|
15
15
|
rclone_api/filelist.py,sha256=xbiusvNgaB_b_kQOZoHMJJxn6TWGtPrWd2J042BI28o,767
|
16
16
|
rclone_api/group_files.py,sha256=H92xPW9lQnbNw5KbtZCl00bD6iRh9yRbCuxku4j_3dg,8036
|
17
17
|
rclone_api/http_server.py,sha256=LhovQu2AI-Z7zQIWflWelCiCDLnWzisL32Rs5350kxE,8850
|
18
|
-
rclone_api/install.py,sha256=
|
18
|
+
rclone_api/install.py,sha256=Xb1BRn8rQcSpSd4dzmvIOELP2zM2DytUeIZ6jzv738A,2893
|
19
19
|
rclone_api/log.py,sha256=VZHM7pNSXip2ZLBKMP7M1u-rp_F7zoafFDuR8CPUoKI,1271
|
20
20
|
rclone_api/mount.py,sha256=TE_VIBMW7J1UkF_6HRCt8oi_jGdMov4S51bm2OgxFAM,10045
|
21
21
|
rclone_api/process.py,sha256=tGooS5NLdPuqHh7hCH8SfK44A6LGftPQCPQUNgSo0a0,5714
|
@@ -24,7 +24,7 @@ rclone_api/remote.py,sha256=mTgMTQTwxUmbLjTpr-AGTId2ycXKI9mLX5L7PPpDIoc,520
|
|
24
24
|
rclone_api/rpath.py,sha256=Y1JjQWcie39EgQrq-UtbfDz5yDLCwwfu27W7AQXllSE,2860
|
25
25
|
rclone_api/scan_missing_folders.py,sha256=-8NCwpCaHeHrX-IepCoAEsX1rl8S-GOCxcIhTr_w3gA,4747
|
26
26
|
rclone_api/types.py,sha256=2ngxwpdNy88y0teeYJ5Vz5NiLK1rfaFx8Xf99i0J-Js,12155
|
27
|
-
rclone_api/util.py,sha256=
|
27
|
+
rclone_api/util.py,sha256=IOjutkZRIbgBChUemLbp6_siVDAYMZ1UlpJgWzV-Zvs,9387
|
28
28
|
rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
|
29
29
|
rclone_api/cmd/analyze.py,sha256=RHbvk1G5ZUc3qLqlm1AZEyQzd_W_ZjcbCNDvW4YpTKQ,1252
|
30
30
|
rclone_api/cmd/copy_large_s3.py,sha256=E0B7P-JJTuOM7wMZtwQHJCpoLhccJleh0mnMq8ZiSUo,3234
|
@@ -52,9 +52,9 @@ rclone_api/s3/multipart/upload_parts_inline.py,sha256=V7syKjFyVIe4U9Ahl5XgqVTzt9
|
|
52
52
|
rclone_api/s3/multipart/upload_parts_resumable.py,sha256=diJoUpVYow6No_dNgOZIYVsv43k4evb6zixqpzWJaUk,9771
|
53
53
|
rclone_api/s3/multipart/upload_parts_server_side_merge.py,sha256=Fp2pdrs5dONQI9LkfNolgAGj1-Z2V1SsRd0r0sreuXI,18040
|
54
54
|
rclone_api/s3/multipart/upload_state.py,sha256=f-Aq2NqtAaMUMhYitlICSNIxCKurWAl2gDEUVizLIqw,6019
|
55
|
-
rclone_api-1.5.
|
56
|
-
rclone_api-1.5.
|
57
|
-
rclone_api-1.5.
|
58
|
-
rclone_api-1.5.
|
59
|
-
rclone_api-1.5.
|
60
|
-
rclone_api-1.5.
|
55
|
+
rclone_api-1.5.3.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
56
|
+
rclone_api-1.5.3.dist-info/METADATA,sha256=sL32Uens2_h-RmqlM_4J3XyVB1G72Vn7MAScW3GJLi8,32776
|
57
|
+
rclone_api-1.5.3.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
|
58
|
+
rclone_api-1.5.3.dist-info/entry_points.txt,sha256=fJteOlYVwgX3UbNuL9jJ0zUTuX2O79JFAeNgK7Sw7EQ,255
|
59
|
+
rclone_api-1.5.3.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
|
60
|
+
rclone_api-1.5.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|