kleinkram 0.28.0.dev20241008161920__tar.gz → 0.29.0.dev20241009151639__tar.gz
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.
Potentially problematic release.
This version of kleinkram might be problematic. Click here for more details.
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/PKG-INFO +1 -1
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/pyproject.toml +1 -1
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/file/file.py +12 -5
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/.gitignore +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/LICENSE +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/README.md +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/deploy.sh +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/dev.sh +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/requirements.txt +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/klein.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/__init__.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/api_client.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/auth/auth.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/consts.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/endpoint/endpoint.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/error_handling.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/helper.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/main.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/mission/mission.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/project/project.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/queue/queue.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/tag/tag.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/topic/topic.py +0 -0
- {kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/user/user.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: kleinkram
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.29.0.dev20241009151639
|
|
4
4
|
Summary: A CLI for the ETH project kleinkram
|
|
5
5
|
Project-URL: Homepage, https://github.com/leggedrobotics/kleinkram
|
|
6
6
|
Project-URL: Issues, https://github.com/leggedrobotics/kleinkram/issues
|
{kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/file/file.py
RENAMED
|
@@ -15,10 +15,17 @@ file = typer.Typer(
|
|
|
15
15
|
context_settings={"help_option_names": ["-h", "--help"]},
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
@file.command("download")
|
|
19
20
|
def download_file(
|
|
20
|
-
file_uuid: Annotated[List[str], typer.Option(
|
|
21
|
-
local_path: Annotated[
|
|
21
|
+
file_uuid: Annotated[List[str], typer.Option(help="UUIDs of the files")],
|
|
22
|
+
local_path: Annotated[
|
|
23
|
+
str,
|
|
24
|
+
typer.Option(
|
|
25
|
+
prompt=True,
|
|
26
|
+
help="Local path to save the file",
|
|
27
|
+
),
|
|
28
|
+
],
|
|
22
29
|
):
|
|
23
30
|
"""
|
|
24
31
|
Download files by UUIDs to a local path.\n
|
|
@@ -35,7 +42,6 @@ def download_file(
|
|
|
35
42
|
isDir = os.path.isdir(fixed_local_path)
|
|
36
43
|
chunk_size = 1024 * 100 # 100 KB chunks, adjust size if needed
|
|
37
44
|
|
|
38
|
-
|
|
39
45
|
for file in file_uuid:
|
|
40
46
|
response = client.get(
|
|
41
47
|
url,
|
|
@@ -48,7 +54,7 @@ def download_file(
|
|
|
48
54
|
)
|
|
49
55
|
download_url = response.text
|
|
50
56
|
if isDir:
|
|
51
|
-
filename = download_url.split("/")[6].split("?")[0]
|
|
57
|
+
filename = download_url.split("/")[6].split("?")[0] # Trust me bro
|
|
52
58
|
filepath = os.path.join(fixed_local_path, filename)
|
|
53
59
|
elif not isDir and len(file_uuid) == 1:
|
|
54
60
|
filepath = fixed_local_path
|
|
@@ -64,6 +70,7 @@ def download_file(
|
|
|
64
70
|
f.write(chunk)
|
|
65
71
|
print(f"Completed")
|
|
66
72
|
|
|
73
|
+
|
|
67
74
|
@file.command("list")
|
|
68
75
|
def list_files(
|
|
69
76
|
project: Optional[str] = typer.Option(None, help="Name of Project"),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/auth/auth.py
RENAMED
|
File without changes
|
{kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/consts.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/helper.py
RENAMED
|
File without changes
|
{kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/main.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/tag/tag.py
RENAMED
|
File without changes
|
|
File without changes
|
{kleinkram-0.28.0.dev20241008161920 → kleinkram-0.29.0.dev20241009151639}/src/kleinkram/user/user.py
RENAMED
|
File without changes
|