rclone-api 1.0.50__tar.gz → 1.0.52__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {rclone_api-1.0.50 → rclone_api-1.0.52}/PKG-INFO +1 -1
- {rclone_api-1.0.50 → rclone_api-1.0.52}/pyproject.toml +1 -1
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/rclone.py +18 -2
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api.egg-info/PKG-INFO +1 -1
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.aiderignore +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.github/workflows/lint.yml +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.github/workflows/push_macos.yml +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.github/workflows/push_ubuntu.yml +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.github/workflows/push_win.yml +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.gitignore +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.pylintrc +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.vscode/launch.json +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.vscode/settings.json +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/.vscode/tasks.json +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/LICENSE +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/MANIFEST.in +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/README.md +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/clean +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/install +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/lint +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/requirements.testing.txt +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/setup.cfg +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/setup.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/__init__.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/assets/example.txt +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/cli.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/cmd/list_files.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/completed_process.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/config.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/convert.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/deprecated.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/diff.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/dir.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/dir_listing.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/exec.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/file.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/filelist.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/group_files.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/process.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/remote.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/rpath.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/util.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api/walk.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api.egg-info/SOURCES.txt +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api.egg-info/dependency_links.txt +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api.egg-info/entry_points.txt +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api.egg-info/requires.txt +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/src/rclone_api.egg-info/top_level.txt +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/test +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_cmd_list_files.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_copy.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_copy_files.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_diff.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_group_files.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_is_synced.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_ls.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_mount.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_mount_s3.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_mount_webdav.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_obscure.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_remote_control.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_remotes.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_serve_webdav.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tests/test_walk.py +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/tox.ini +0 -0
- {rclone_api-1.0.50 → rclone_api-1.0.52}/upload_package.sh +0 -0
@@ -273,6 +273,7 @@ class Rclone:
|
|
273
273
|
dst: str,
|
274
274
|
files: list[str],
|
275
275
|
check=True,
|
276
|
+
verbose: bool | None = None,
|
276
277
|
other_args: list[str] | None = None,
|
277
278
|
) -> list[CompletedProcess]:
|
278
279
|
"""Copy multiple files from source to destination.
|
@@ -280,10 +281,17 @@ class Rclone:
|
|
280
281
|
Args:
|
281
282
|
payload: Dictionary of source and destination file paths
|
282
283
|
"""
|
284
|
+
verbose = get_verbose(verbose)
|
283
285
|
payload: list[str] = convert_to_filestr_list(files)
|
284
286
|
if len(payload) == 0:
|
285
287
|
return []
|
286
288
|
|
289
|
+
for p in payload:
|
290
|
+
if ":" in p:
|
291
|
+
raise ValueError(
|
292
|
+
f"Invalid file path, contains a remote, which is not allowed for copy_files: {p}"
|
293
|
+
)
|
294
|
+
|
287
295
|
datalists: dict[str, list[str]] = group_files(payload, fully_qualified=False)
|
288
296
|
# out: subprocess.CompletedProcess | None = None
|
289
297
|
out: list[CompletedProcess] = []
|
@@ -293,6 +301,10 @@ class Rclone:
|
|
293
301
|
for common_prefix, files in datalists.items():
|
294
302
|
|
295
303
|
def _task(files=files) -> subprocess.CompletedProcess:
|
304
|
+
if verbose:
|
305
|
+
nfiles = len(files)
|
306
|
+
files_str = "\n".join(files)
|
307
|
+
print(f"Copying {nfiles} files: \n{files_str}")
|
296
308
|
with TemporaryDirectory() as tmpdir:
|
297
309
|
include_files_txt = Path(tmpdir) / "include_files.txt"
|
298
310
|
include_files_txt.write_text("\n".join(files), encoding="utf-8")
|
@@ -314,9 +326,11 @@ class Rclone:
|
|
314
326
|
"--transfers",
|
315
327
|
"1000",
|
316
328
|
]
|
329
|
+
if verbose:
|
330
|
+
cmd_list.append("-vvvv")
|
317
331
|
if other_args is not None:
|
318
332
|
cmd_list += other_args
|
319
|
-
out = self._run(cmd_list)
|
333
|
+
out = self._run(cmd_list, capture=not verbose)
|
320
334
|
return out
|
321
335
|
|
322
336
|
fut: Future = EXECUTOR.submit(_task)
|
@@ -364,8 +378,11 @@ class Rclone:
|
|
364
378
|
other_args: list[str] | None = None,
|
365
379
|
) -> CompletedProcess:
|
366
380
|
"""Delete a directory"""
|
381
|
+
verbose = get_verbose(verbose)
|
367
382
|
payload: list[str] = convert_to_filestr_list(files)
|
368
383
|
if len(payload) == 0:
|
384
|
+
if verbose:
|
385
|
+
print("No files to delete")
|
369
386
|
cp = subprocess.CompletedProcess(
|
370
387
|
args=["rclone", "delete", "--files-from", "[]"],
|
371
388
|
returncode=0,
|
@@ -376,7 +393,6 @@ class Rclone:
|
|
376
393
|
|
377
394
|
datalists: dict[str, list[str]] = group_files(payload)
|
378
395
|
completed_processes: list[subprocess.CompletedProcess] = []
|
379
|
-
verbose = get_verbose(verbose)
|
380
396
|
|
381
397
|
futures: list[Future] = []
|
382
398
|
|
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
|
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
|
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
|