rclone-api 1.3.9__py2.py3-none-any.whl → 1.3.10__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/save_to_db.py +8 -2
- {rclone_api-1.3.9.dist-info → rclone_api-1.3.10.dist-info}/METADATA +1 -1
- {rclone_api-1.3.9.dist-info → rclone_api-1.3.10.dist-info}/RECORD +7 -7
- {rclone_api-1.3.9.dist-info → rclone_api-1.3.10.dist-info}/LICENSE +0 -0
- {rclone_api-1.3.9.dist-info → rclone_api-1.3.10.dist-info}/WHEEL +0 -0
- {rclone_api-1.3.9.dist-info → rclone_api-1.3.10.dist-info}/entry_points.txt +0 -0
- {rclone_api-1.3.9.dist-info → rclone_api-1.3.10.dist-info}/top_level.txt +0 -0
rclone_api/cmd/save_to_db.py
CHANGED
|
@@ -16,7 +16,7 @@ from rclone_api import Rclone
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def _db_url_from_env_or_raise() -> str:
|
|
19
|
-
load_dotenv()
|
|
19
|
+
load_dotenv(Path(".env"))
|
|
20
20
|
db_url = os.getenv("DB_URL")
|
|
21
21
|
if db_url is None:
|
|
22
22
|
raise ValueError("DB_URL not set")
|
|
@@ -27,6 +27,7 @@ def _db_url_from_env_or_raise() -> str:
|
|
|
27
27
|
class Args:
|
|
28
28
|
config: Path
|
|
29
29
|
path: str
|
|
30
|
+
db_url: str
|
|
30
31
|
|
|
31
32
|
def __post_init__(self):
|
|
32
33
|
if not self.config.exists():
|
|
@@ -45,9 +46,14 @@ def _parse_args() -> Args:
|
|
|
45
46
|
parser.add_argument(
|
|
46
47
|
"--config", help="Path to rclone config file", type=Path, default="rclone.conf"
|
|
47
48
|
)
|
|
49
|
+
parser.add_argument("db-url", help="Database URL", type=str, default=None)
|
|
48
50
|
parser.add_argument("path", help="Remote path to list")
|
|
49
51
|
tmp = parser.parse_args()
|
|
50
|
-
return Args(
|
|
52
|
+
return Args(
|
|
53
|
+
config=tmp.config,
|
|
54
|
+
path=tmp.path,
|
|
55
|
+
db_url=tmp.db_url if tmp.db_url is not None else _db_url_from_env_or_raise(),
|
|
56
|
+
)
|
|
51
57
|
|
|
52
58
|
|
|
53
59
|
def main() -> int:
|
|
@@ -27,7 +27,7 @@ rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8
|
|
|
27
27
|
rclone_api/cmd/analyze.py,sha256=RHbvk1G5ZUc3qLqlm1AZEyQzd_W_ZjcbCNDvW4YpTKQ,1252
|
|
28
28
|
rclone_api/cmd/copy_large_s3.py,sha256=nOpAUAQN1mJnf4EIZCh4OVCW7Q4_EXJeLFVe6r_9rZA,3369
|
|
29
29
|
rclone_api/cmd/list_files.py,sha256=x8FHODEilwKqwdiU1jdkeJbLwOqUkUQuDWPo2u_zpf0,741
|
|
30
|
-
rclone_api/cmd/save_to_db.py,sha256=
|
|
30
|
+
rclone_api/cmd/save_to_db.py,sha256=1oecPz21AEQTKPby71RlQzfMTNTpnjTzjGVWItW4IBk,1764
|
|
31
31
|
rclone_api/db/__init__.py,sha256=OSRUdnSWUlDTOHmjdjVmxYTUNpTbtaJ5Ll9sl-PfZg0,40
|
|
32
32
|
rclone_api/db/db.py,sha256=j39iDI6kiI3X0TwQwWkLeo3fnTVNlwuc6pdg6L7Nnq0,9932
|
|
33
33
|
rclone_api/db/models.py,sha256=unKEiu8l4R4UAEoncEbOHEda227DpXm-cWwRV6vwJXE,1657
|
|
@@ -41,9 +41,9 @@ rclone_api/s3/chunk_types.py,sha256=oSWv8No9V3BeM7IcGnowyR2a7YrszdAXzEJlxaeZcp0,
|
|
|
41
41
|
rclone_api/s3/create.py,sha256=wgfkapv_j904CfKuWyiBIWJVxfAx_ftemFSUV14aT68,3149
|
|
42
42
|
rclone_api/s3/types.py,sha256=Elmh__gvZJyJyElYwMmvYZIBIunDJiTRAbEg21GmsRU,1604
|
|
43
43
|
rclone_api/s3/upload_file_multipart.py,sha256=d8ZWqO8n9wsqRF6JjmvAFmG1aCkFqdSB1L8yxe_5qiY,11669
|
|
44
|
-
rclone_api-1.3.
|
|
45
|
-
rclone_api-1.3.
|
|
46
|
-
rclone_api-1.3.
|
|
47
|
-
rclone_api-1.3.
|
|
48
|
-
rclone_api-1.3.
|
|
49
|
-
rclone_api-1.3.
|
|
44
|
+
rclone_api-1.3.10.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
|
45
|
+
rclone_api-1.3.10.dist-info/METADATA,sha256=rMqaOEkYnIlvRGEjI90mUTDEc-vNztlDUcDyoCVM4-E,4610
|
|
46
|
+
rclone_api-1.3.10.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
|
|
47
|
+
rclone_api-1.3.10.dist-info/entry_points.txt,sha256=fJteOlYVwgX3UbNuL9jJ0zUTuX2O79JFAeNgK7Sw7EQ,255
|
|
48
|
+
rclone_api-1.3.10.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
|
|
49
|
+
rclone_api-1.3.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|