slab-cli 0.25.0__tar.gz → 0.26.0__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.
- {slab_cli-0.25.0 → slab_cli-0.26.0}/PKG-INFO +3 -2
- {slab_cli-0.25.0 → slab_cli-0.26.0}/README.md +1 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/pyproject.toml +2 -2
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/client.py +7 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/custom_sets.py +24 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/registry.py +1 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/config.py +6 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/__init__.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/banner.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/browse.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/__init__.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/breaks.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/catalog.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/collection.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/export.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/lots.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/pricing.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/setup.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/commands/update.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/context.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/display.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/flags.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/help.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/main.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/nav.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/paging.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/picker.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/platforms/__init__.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/platforms/base.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/platforms/posix.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/platforms/windows.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/prompts.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/sources.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/theme.py +0 -0
- {slab_cli-0.25.0 → slab_cli-0.26.0}/src/slab_cli/updates.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: slab-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.26.0
|
|
4
4
|
Summary: CLI for the slab trading-card API — catalog, collect, and track your cards from the terminal.
|
|
5
5
|
Author: dev_jeb
|
|
6
|
-
Requires-Dist: slab-schemas>=0.
|
|
6
|
+
Requires-Dist: slab-schemas>=0.50.0
|
|
7
7
|
Requires-Dist: httpx>=0.27
|
|
8
8
|
Requires-Dist: rich>=13.0
|
|
9
9
|
Requires-Dist: inquirerpy>=0.3
|
|
@@ -61,6 +61,7 @@ to see a group's verbs.
|
|
|
61
61
|
| `SLAB_API_KEY` | API key for authentication (**required**) | — |
|
|
62
62
|
| `SLAB_API_URL` | Base URL of the slab API | `https://api.slab.dev-jeb.com` |
|
|
63
63
|
| `SLAB_COLLECTOR` | Active collector UUID, reused per command | — |
|
|
64
|
+
| `SLAB_APP_URL` | Where `slab chase share` links open | `https://collection.slab.dev-jeb.com` |
|
|
64
65
|
| `SLAB_NO_UPDATE_CHECK` | Set to `1` to silence update checks | — |
|
|
65
66
|
|
|
66
67
|
## Staying up to date
|
|
@@ -49,6 +49,7 @@ to see a group's verbs.
|
|
|
49
49
|
| `SLAB_API_KEY` | API key for authentication (**required**) | — |
|
|
50
50
|
| `SLAB_API_URL` | Base URL of the slab API | `https://api.slab.dev-jeb.com` |
|
|
51
51
|
| `SLAB_COLLECTOR` | Active collector UUID, reused per command | — |
|
|
52
|
+
| `SLAB_APP_URL` | Where `slab chase share` links open | `https://collection.slab.dev-jeb.com` |
|
|
52
53
|
| `SLAB_NO_UPDATE_CHECK` | Set to `1` to silence update checks | — |
|
|
53
54
|
|
|
54
55
|
## Staying up to date
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "slab-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.26.0"
|
|
4
4
|
description = "CLI for the slab trading-card API — catalog, collect, and track your cards from the terminal."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{name = "dev_jeb"}]
|
|
@@ -12,7 +12,7 @@ dependencies = [
|
|
|
12
12
|
# 0.34 reframes the grading desk from verdicts to break-even readings (BreakEvenRegion,
|
|
13
13
|
# GradingDesk.break_even) — the desk shows data, never tells the user to grade.
|
|
14
14
|
# 0.35 adds Liquidity/LiquidityLabel, which the market view's Sells column renders.
|
|
15
|
-
"slab-schemas>=0.
|
|
15
|
+
"slab-schemas>=0.50.0", # metrics registry: served momentum/trend labels
|
|
16
16
|
"httpx>=0.27",
|
|
17
17
|
"rich>=13.0",
|
|
18
18
|
"InquirerPy>=0.3",
|
|
@@ -18,6 +18,7 @@ from slab_schemas.cards import (
|
|
|
18
18
|
)
|
|
19
19
|
from slab_schemas.community import CommunityBoard
|
|
20
20
|
from slab_schemas.serials import CardSerials
|
|
21
|
+
from slab_schemas.snapshots import SnapshotRef
|
|
21
22
|
from slab_schemas.collection import (
|
|
22
23
|
BreakCreate,
|
|
23
24
|
BreakOut,
|
|
@@ -357,6 +358,12 @@ class SlabClient:
|
|
|
357
358
|
)
|
|
358
359
|
return CustomSetOut.model_validate(resp.json())
|
|
359
360
|
|
|
361
|
+
def create_custom_set_snapshot(self, set_uuid: str, collector_uuid: str | None = None) -> SnapshotRef:
|
|
362
|
+
"""Today's tear sheet for a chase — with this collector's have/need when one is given."""
|
|
363
|
+
params = {"collector_uuid": collector_uuid} if collector_uuid else {}
|
|
364
|
+
resp = self._request("POST", f"/custom-sets/{set_uuid}/snapshots", params=params)
|
|
365
|
+
return SnapshotRef.model_validate(resp.json())
|
|
366
|
+
|
|
360
367
|
def update_custom_set(self, collector_uuid: str, set_uuid: str, payload: CustomSetUpdate) -> CustomSetOut:
|
|
361
368
|
resp = self._request(
|
|
362
369
|
"PATCH",
|
|
@@ -18,6 +18,7 @@ from slab_schemas.custom_sets import (
|
|
|
18
18
|
from slab_schemas.enums import CustomSetType, DynamicMatch, MatchMode, Visibility
|
|
19
19
|
|
|
20
20
|
from ..client import SlabClient
|
|
21
|
+
from ..config import get_app_url
|
|
21
22
|
from ..context import ctx
|
|
22
23
|
from ..display import (
|
|
23
24
|
browse_custom_sets,
|
|
@@ -385,6 +386,29 @@ def cmd_chase_view(args: list[str]) -> None:
|
|
|
385
386
|
break
|
|
386
387
|
|
|
387
388
|
|
|
389
|
+
def cmd_chase_share(args: list[str]) -> None:
|
|
390
|
+
"""Print a tear sheet: a set's whole checklist frozen as of today, at a public link."""
|
|
391
|
+
collector = ctx.collector
|
|
392
|
+
client = ctx.client
|
|
393
|
+
|
|
394
|
+
if args:
|
|
395
|
+
set_uuid = args[0]
|
|
396
|
+
else:
|
|
397
|
+
cs = _select_custom_set(client, collector, message="Which set to share?")
|
|
398
|
+
if cs is None:
|
|
399
|
+
return
|
|
400
|
+
set_uuid = cs.uuid
|
|
401
|
+
|
|
402
|
+
# Progress is opt-in: the sheet is public, and have/need is the one personal thing on it.
|
|
403
|
+
mine = confirm("Include your progress (which cards you have)? It never shows your name.", default=False)
|
|
404
|
+
ref = client.create_custom_set_snapshot(set_uuid, collector if mine else None)
|
|
405
|
+
link = f"{get_app_url()}/s/{ref.uuid}"
|
|
406
|
+
console.print(f"\n [bold]{link}[/bold]")
|
|
407
|
+
note = "made just now" if ref.created else "already made today — same link"
|
|
408
|
+
console.print(f" [dim]As of {ref.as_of:%b %-d, %Y} · {note} · "
|
|
409
|
+
f"{'with your progress' if ref.includes_progress else 'no progress'}[/dim]\n")
|
|
410
|
+
|
|
411
|
+
|
|
388
412
|
def cmd_chase_edit(args: list[str]) -> None:
|
|
389
413
|
"""Edit a custom set's name, description, visibility, or (dynamic) match granularity."""
|
|
390
414
|
collector = ctx.collector
|
|
@@ -99,6 +99,7 @@ GROUPS: list[Group] = [
|
|
|
99
99
|
Command("create", "Create a custom set (curated or dynamic)", custom_sets.cmd_chase_create),
|
|
100
100
|
Command("add", "Add cards or player slots to a curated set", custom_sets.cmd_chase_add),
|
|
101
101
|
Command("view", "View a set with completion + add missing", custom_sets.cmd_chase_view, "[uuid]"),
|
|
102
|
+
Command("share", "Tear sheet: a dated public link to a set's checklist", custom_sets.cmd_chase_share, "[uuid]"),
|
|
102
103
|
Command("edit", "Edit name, description, visibility, or granularity", custom_sets.cmd_chase_edit),
|
|
103
104
|
Command("tune", "Retune one entry — match mode or player-slot qualifiers", custom_sets.cmd_chase_tune),
|
|
104
105
|
Command("list", "Your sets (created + subscribed)", custom_sets.cmd_chase_list),
|
|
@@ -10,6 +10,12 @@ def get_base_url() -> str:
|
|
|
10
10
|
return url or "https://api.slab.dev-jeb.com"
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
def get_app_url() -> str:
|
|
14
|
+
"""The hosted app — where a tear sheet link opens (``/s/<uuid>``)."""
|
|
15
|
+
url = os.environ.get("SLAB_APP_URL", "").strip()
|
|
16
|
+
return (url or "https://collection.slab.dev-jeb.com").rstrip("/")
|
|
17
|
+
|
|
18
|
+
|
|
13
19
|
def get_api_key() -> str | None:
|
|
14
20
|
key = os.environ.get("SLAB_API_KEY", "").strip()
|
|
15
21
|
return key or None
|
|
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
|