rclone-api 1.0.22__py2.py3-none-any.whl → 1.0.23__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/cmd/list_files.py +27 -0
- {rclone_api-1.0.22.dist-info → rclone_api-1.0.23.dist-info}/METADATA +1 -1
- {rclone_api-1.0.22.dist-info → rclone_api-1.0.23.dist-info}/RECORD +7 -5
- rclone_api-1.0.23.dist-info/entry_points.txt +2 -0
- {rclone_api-1.0.22.dist-info → rclone_api-1.0.23.dist-info}/LICENSE +0 -0
- {rclone_api-1.0.22.dist-info → rclone_api-1.0.23.dist-info}/WHEEL +0 -0
- {rclone_api-1.0.22.dist-info → rclone_api-1.0.23.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
import argparse
|
2
|
+
from pathlib import Path
|
3
|
+
|
4
|
+
from rclone_api import Rclone
|
5
|
+
|
6
|
+
|
7
|
+
def list_files(rclone: Rclone, path: str):
|
8
|
+
"""List files in a remote path."""
|
9
|
+
for dirlisting in rclone.walk(path):
|
10
|
+
for file in dirlisting.files:
|
11
|
+
print(file.path)
|
12
|
+
|
13
|
+
|
14
|
+
def _parse_args() -> argparse.Namespace:
|
15
|
+
parser = argparse.ArgumentParser(description="List files in a remote path.")
|
16
|
+
parser.add_argument("--config", help="Path to rclone config file", required=True)
|
17
|
+
parser.add_argument("path", help="Remote path to list")
|
18
|
+
return parser.parse_args()
|
19
|
+
|
20
|
+
|
21
|
+
def main() -> int:
|
22
|
+
"""Main entry point."""
|
23
|
+
args = _parse_args()
|
24
|
+
path = args.path
|
25
|
+
rclone = Rclone(Path(args.config))
|
26
|
+
list_files(rclone, path)
|
27
|
+
return 0
|
@@ -14,8 +14,10 @@ rclone_api/rpath.py,sha256=8ZA_1wxWtskwcy0I8V2VbjKDmzPkiWd8Q2JQSvh-sYE,2586
|
|
14
14
|
rclone_api/util.py,sha256=AWTImA1liCMw52wtS-Gs8Abz96diQ39x6Tx56mvbrEo,3860
|
15
15
|
rclone_api/walk.py,sha256=kca0t1GAnF6FLclN01G8NG__Qe-ggodLtAbQSHyVPng,2968
|
16
16
|
rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
|
17
|
-
rclone_api
|
18
|
-
rclone_api-1.0.
|
19
|
-
rclone_api-1.0.
|
20
|
-
rclone_api-1.0.
|
21
|
-
rclone_api-1.0.
|
17
|
+
rclone_api/cmd/list_files.py,sha256=x8FHODEilwKqwdiU1jdkeJbLwOqUkUQuDWPo2u_zpf0,741
|
18
|
+
rclone_api-1.0.23.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
19
|
+
rclone_api-1.0.23.dist-info/METADATA,sha256=UWJf59LRcykpcIWrMtB0mZi_75RvEMXjI48U1bWhGwE,4454
|
20
|
+
rclone_api-1.0.23.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
|
21
|
+
rclone_api-1.0.23.dist-info/entry_points.txt,sha256=XUoTX3m7CWxdj2VAKhEuO0NMOfX2qf-OcEDFwdyk9ZE,72
|
22
|
+
rclone_api-1.0.23.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
|
23
|
+
rclone_api-1.0.23.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|