artdam-cli 0.4.2__tar.gz → 0.4.3__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.
Files changed (37) hide show
  1. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/PKG-INFO +1 -1
  2. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/update.py +12 -4
  3. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli.egg-info/PKG-INFO +1 -1
  4. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/pyproject.toml +1 -1
  5. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/README.md +0 -0
  6. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/__init__.py +0 -0
  7. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/client.py +0 -0
  8. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/__init__.py +0 -0
  9. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/comment.py +0 -0
  10. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/delete_cmd.py +0 -0
  11. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/download.py +0 -0
  12. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/engine.py +0 -0
  13. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/favorite.py +0 -0
  14. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/folder_cmd.py +0 -0
  15. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/folders.py +0 -0
  16. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/get.py +0 -0
  17. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/login.py +0 -0
  18. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/project.py +0 -0
  19. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/projects.py +0 -0
  20. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/rate.py +0 -0
  21. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/restore.py +0 -0
  22. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/search.py +0 -0
  23. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/tag_cmd.py +0 -0
  24. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/tags.py +0 -0
  25. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/commands/upload.py +0 -0
  26. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/config.py +0 -0
  27. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/main.py +0 -0
  28. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/update_check.py +0 -0
  29. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli/uploader.py +0 -0
  30. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli.egg-info/SOURCES.txt +0 -0
  31. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli.egg-info/dependency_links.txt +0 -0
  32. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli.egg-info/entry_points.txt +0 -0
  33. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli.egg-info/requires.txt +0 -0
  34. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/artdam_cli.egg-info/top_level.txt +0 -0
  35. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/setup.cfg +0 -0
  36. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/tests/test_search_pagination.py +0 -0
  37. {artdam_cli-0.4.2 → artdam_cli-0.4.3}/tests/test_uploader.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: artdam-cli
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: ArtDAM 数字资产管理平台命令行工具
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -7,7 +7,9 @@ from artdam_cli import client
7
7
  @click.argument("asset_id", type=int)
8
8
  @click.option("--name", "-n", default=None, help="新文件名")
9
9
  @click.option("--description", "-d", default=None, help="新描述")
10
- @click.option("--folder", "-f", type=int, default=None, help="目标文件夹 ID(0 = 移出文件夹)")
10
+ @click.option(
11
+ "--folder", "-f", type=int, default=None, help="目标文件夹 ID(0 = 移出文件夹)"
12
+ )
11
13
  @click.option("--supplier", default=None, help="供应商真名(传空串 = 清空为 null)")
12
14
  def update(
13
15
  asset_id: int,
@@ -18,14 +20,18 @@ def update(
18
20
  ) -> None:
19
21
  """更新资产:重命名、改描述、移动文件夹、改供应商。"""
20
22
  if name is None and description is None and folder is None and supplier is None:
21
- raise SystemExit("请至少指定一个选项:--name / --description / --folder / --supplier")
23
+ raise SystemExit(
24
+ "请至少指定一个选项:--name / --description / --folder / --supplier"
25
+ )
22
26
 
23
27
  if name is not None:
24
28
  client.patch(f"/api/assets/{asset_id}/rename", {"filename": name})
25
29
  click.echo(f"✓ 已重命名为 {name}")
26
30
 
27
31
  if description is not None:
28
- client.patch(f"/api/assets/{asset_id}/description", {"description": description})
32
+ client.patch(
33
+ f"/api/assets/{asset_id}/description", {"description": description}
34
+ )
29
35
  click.echo("✓ 描述已更新")
30
36
 
31
37
  if folder is not None:
@@ -35,5 +41,7 @@ def update(
35
41
 
36
42
  if supplier is not None:
37
43
  # 空串 → None:对齐 PATCH /supplier 契约的 null(清空供应商)
38
- client.patch(f"/api/assets/{asset_id}/supplier", {"supplier_name": supplier or None})
44
+ client.patch(
45
+ f"/api/assets/{asset_id}/supplier", {"supplier_name": supplier or None}
46
+ )
39
47
  click.echo("✓ 供应商已更新")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: artdam-cli
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: ArtDAM 数字资产管理平台命令行工具
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "artdam-cli"
7
- version = "0.4.2"
7
+ version = "0.4.3"
8
8
  requires-python = ">=3.10"
9
9
  description = "ArtDAM 数字资产管理平台命令行工具"
10
10
  readme = "README.md"
File without changes
File without changes