rclone-api 1.0.60__tar.gz → 1.0.61__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {rclone_api-1.0.60 → rclone_api-1.0.61}/PKG-INFO +1 -1
- {rclone_api-1.0.60 → rclone_api-1.0.61}/pyproject.toml +1 -1
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/rclone.py +28 -8
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api.egg-info/PKG-INFO +1 -1
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.aiderignore +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.github/workflows/lint.yml +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.github/workflows/push_macos.yml +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.github/workflows/push_ubuntu.yml +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.github/workflows/push_win.yml +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.gitignore +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.pylintrc +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.vscode/launch.json +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.vscode/settings.json +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/.vscode/tasks.json +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/LICENSE +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/MANIFEST.in +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/README.md +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/clean +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/install +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/lint +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/requirements.testing.txt +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/setup.cfg +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/setup.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/__init__.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/assets/example.txt +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/cli.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/cmd/list_files.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/completed_process.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/config.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/convert.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/deprecated.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/diff.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/dir.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/dir_listing.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/exec.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/file.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/filelist.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/group_files.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/process.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/remote.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/rpath.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/util.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api/walk.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api.egg-info/SOURCES.txt +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api.egg-info/dependency_links.txt +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api.egg-info/entry_points.txt +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api.egg-info/requires.txt +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/src/rclone_api.egg-info/top_level.txt +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/test +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_cmd_list_files.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_copy.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_copy_files.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_diff.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_group_files.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_is_synced.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_ls.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_mount.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_mount_s3.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_mount_webdav.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_obscure.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_remote_control.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_remotes.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_serve_webdav.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tests/test_walk.py +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/tox.ini +0 -0
- {rclone_api-1.0.60 → rclone_api-1.0.61}/upload_package.sh +0 -0
@@ -299,7 +299,7 @@ class Rclone:
|
|
299
299
|
self,
|
300
300
|
src: str,
|
301
301
|
dst: str,
|
302
|
-
files: list[str],
|
302
|
+
files: list[str] | Path,
|
303
303
|
check: bool | None = None,
|
304
304
|
verbose: bool | None = None,
|
305
305
|
checkers: int | None = None,
|
@@ -322,7 +322,11 @@ class Rclone:
|
|
322
322
|
checkers = checkers or 1000
|
323
323
|
transfers = transfers or 32
|
324
324
|
verbose = get_verbose(verbose)
|
325
|
-
payload: list[str] =
|
325
|
+
payload: list[str] = (
|
326
|
+
files
|
327
|
+
if isinstance(files, list)
|
328
|
+
else [f.strip() for f in files.read_text().splitlines() if f.strip()]
|
329
|
+
)
|
326
330
|
if len(payload) == 0:
|
327
331
|
return []
|
328
332
|
|
@@ -341,10 +345,26 @@ class Rclone:
|
|
341
345
|
with ThreadPoolExecutor(max_workers=max_partition_workers) as executor:
|
342
346
|
for common_prefix, files in datalists.items():
|
343
347
|
|
344
|
-
def _task(
|
348
|
+
def _task(
|
349
|
+
files: list[str] | Path = files,
|
350
|
+
) -> subprocess.CompletedProcess:
|
345
351
|
with TemporaryDirectory() as tmpdir:
|
346
|
-
|
347
|
-
|
352
|
+
filelist: list[str] = []
|
353
|
+
filepath: Path
|
354
|
+
if isinstance(files, list):
|
355
|
+
include_files_txt = Path(tmpdir) / "include_files.txt"
|
356
|
+
include_files_txt.write_text(
|
357
|
+
"\n".join(files), encoding="utf-8"
|
358
|
+
)
|
359
|
+
filelist = list(files)
|
360
|
+
filepath = Path(include_files_txt)
|
361
|
+
elif isinstance(files, Path):
|
362
|
+
filelist = [
|
363
|
+
f.strip()
|
364
|
+
for f in files.read_text().splitlines()
|
365
|
+
if f.strip()
|
366
|
+
]
|
367
|
+
filepath = files
|
348
368
|
if common_prefix:
|
349
369
|
src_path = f"{src}/{common_prefix}"
|
350
370
|
dst_path = f"{dst}/{common_prefix}"
|
@@ -353,8 +373,8 @@ class Rclone:
|
|
353
373
|
dst_path = dst
|
354
374
|
|
355
375
|
if verbose:
|
356
|
-
nfiles = len(
|
357
|
-
files_fqdn = [f" {src_path}/{f}" for f in
|
376
|
+
nfiles = len(filelist)
|
377
|
+
files_fqdn = [f" {src_path}/{f}" for f in filelist]
|
358
378
|
print(f"Copying {nfiles} files:")
|
359
379
|
chunk_size = 100
|
360
380
|
for i in range(0, nfiles, chunk_size):
|
@@ -370,7 +390,7 @@ class Rclone:
|
|
370
390
|
src_path,
|
371
391
|
dst_path,
|
372
392
|
"--files-from",
|
373
|
-
str(
|
393
|
+
str(filepath),
|
374
394
|
"--checkers",
|
375
395
|
str(checkers),
|
376
396
|
"--transfers",
|
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
|