slab-cli 0.26.0__tar.gz → 0.27.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.26.0 → slab_cli-0.27.0}/PKG-INFO +2 -2
- {slab_cli-0.26.0 → slab_cli-0.27.0}/pyproject.toml +2 -2
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/display.py +45 -4
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/theme.py +2 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/README.md +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/__init__.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/banner.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/browse.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/client.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/__init__.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/breaks.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/catalog.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/collection.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/custom_sets.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/export.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/lots.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/pricing.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/registry.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/setup.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/commands/update.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/config.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/context.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/flags.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/help.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/main.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/nav.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/paging.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/picker.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/platforms/__init__.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/platforms/base.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/platforms/posix.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/platforms/windows.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/prompts.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.0}/src/slab_cli/sources.py +0 -0
- {slab_cli-0.26.0 → slab_cli-0.27.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.27.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.53.0
|
|
7
7
|
Requires-Dist: httpx>=0.27
|
|
8
8
|
Requires-Dist: rich>=13.0
|
|
9
9
|
Requires-Dist: inquirerpy>=0.3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "slab-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.27.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.53.0", # metrics registry: served momentum/trend labels
|
|
16
16
|
"httpx>=0.27",
|
|
17
17
|
"rich>=13.0",
|
|
18
18
|
"InquirerPy>=0.3",
|
|
@@ -1374,6 +1374,24 @@ def render_comps(c: CardComps) -> None:
|
|
|
1374
1374
|
console.print()
|
|
1375
1375
|
|
|
1376
1376
|
|
|
1377
|
+
def _whole_dollars(v) -> str:
|
|
1378
|
+
"""`$235` — estimates are ballparks, so never cents."""
|
|
1379
|
+
return f"${float(v):,.0f}"
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
def estimate_sentence(e) -> str:
|
|
1383
|
+
"""One plain sentence for an ESTIMATED grade (a grade the printing has never sold at, priced
|
|
1384
|
+
from similar cards): what it is, what it rests on, how close estimates like it land. Same
|
|
1385
|
+
words as the site's `estimateSentence`."""
|
|
1386
|
+
pct = round(abs(e.typical_jump) * 100)
|
|
1387
|
+
jump = ("about the same as raw" if pct == 0
|
|
1388
|
+
else f"{pct}% {'below' if e.typical_jump < 0 else 'above'} raw")
|
|
1389
|
+
return (f"{e.grade_key.replace('-', ' ')} ≈ {_whole_dollars(e.fair_market_value)} ({jump}), "
|
|
1390
|
+
f"estimated from {e.basis_label}. Half of test estimates like this landed between "
|
|
1391
|
+
f"{_whole_dollars(e.range_low)} and {_whole_dollars(e.range_high)}; a typical one was "
|
|
1392
|
+
f"off by {e.typical_miss_pct}%.")
|
|
1393
|
+
|
|
1394
|
+
|
|
1377
1395
|
def _desk_reading_line(d: GradingDesk) -> str:
|
|
1378
1396
|
"""Where the math lands, as one plain DATA sentence — never an instruction. slab's principle:
|
|
1379
1397
|
grading is subjective and the user is holding the card, so the desk states what the prices
|
|
@@ -1382,23 +1400,28 @@ def _desk_reading_line(d: GradingDesk) -> str:
|
|
|
1382
1400
|
def payoff_of(grade_key: str | None):
|
|
1383
1401
|
return next((l.payoff for l in d.lanes if l.grade_key == grade_key), None)
|
|
1384
1402
|
|
|
1403
|
+
def named(grade_key: str | None) -> str | None:
|
|
1404
|
+
"""A grade the card has never sold at is an estimate — say so wherever one is named."""
|
|
1405
|
+
estimated = any(l.grade_key == grade_key and l.estimate for l in d.lanes)
|
|
1406
|
+
return f"{grade_key} (estimated)" if estimated else grade_key
|
|
1407
|
+
|
|
1385
1408
|
gem = next((l for l in d.lanes if l.grade_key.startswith(f"{d.grading_company}-")), None)
|
|
1386
1409
|
if d.break_even == BreakEvenRegion.not_enough_data:
|
|
1387
1410
|
return ("[slab.dim]No graded market to read yet — nobody has sold graded copies of this "
|
|
1388
1411
|
"card recently. Not a no; an honest shrug.[/]")
|
|
1389
1412
|
if d.break_even == BreakEvenRegion.pays_at_no_grade:
|
|
1390
|
-
top = f"even a {gem.grade_key} returns {signed_money(gem.payoff)}" if gem and gem.payoff is not None else "no grade covers the fee"
|
|
1413
|
+
top = f"even a {named(gem.grade_key)} returns {signed_money(gem.payoff)}" if gem and gem.payoff is not None else "no grade covers the fee"
|
|
1391
1414
|
return (f"[slab.loss]No grade covers the fee[/] — at today's prices {top} "
|
|
1392
1415
|
f"after the {money(d.fee)} fee.")
|
|
1393
1416
|
miss_pay = payoff_of(d.miss_grade)
|
|
1394
1417
|
if d.break_even == BreakEvenRegion.pays_at_any_grade:
|
|
1395
|
-
miss_txt = (f"even a {d.miss_grade} nets {signed_money(miss_pay)}"
|
|
1418
|
+
miss_txt = (f"even a {named(d.miss_grade)} nets {signed_money(miss_pay)}"
|
|
1396
1419
|
if miss_pay is not None else "even a realistic miss nets more than staying raw")
|
|
1397
1420
|
return (f"[slab.gain]Every grade pays[/] — at today's prices {miss_txt} "
|
|
1398
1421
|
f"after the {money(d.fee)} fee.")
|
|
1399
1422
|
pct = f"{d.ten_confidence_needed:.0%}"
|
|
1400
|
-
gem_txt = f"a {gem.grade_key} nets {signed_money(gem.payoff)}" if gem else "a gem pays"
|
|
1401
|
-
miss_txt = (f"a {d.miss_grade} comes back {signed_money(miss_pay)}"
|
|
1423
|
+
gem_txt = f"a {named(gem.grade_key)} nets {signed_money(gem.payoff)}" if gem else "a gem pays"
|
|
1424
|
+
miss_txt = (f"a {named(d.miss_grade)} comes back {signed_money(miss_pay)}"
|
|
1402
1425
|
if miss_pay is not None else f"a miss holds roughly raw value")
|
|
1403
1426
|
return (f"[slab.foil]Depends on the grade[/] — {gem_txt}, {miss_txt}. Break-even sits at "
|
|
1404
1427
|
f"{pct}: below that chance of a gem, grading loses; above it, grading wins. "
|
|
@@ -1436,6 +1459,12 @@ def render_grading_desk(d: GradingDesk) -> None:
|
|
|
1436
1459
|
("Sells", {"style": "slab.dim"}),
|
|
1437
1460
|
])
|
|
1438
1461
|
for l in d.lanes:
|
|
1462
|
+
if l.estimate:
|
|
1463
|
+
# An estimate, not sales: tagged, approximate, whole dollars — explained below.
|
|
1464
|
+
payoff = f"~{signed_money(l.payoff)}" if l.payoff is not None else signed_money(None)
|
|
1465
|
+
table.add_row(f"{l.grade_key} [slab.warn]est.[/]",
|
|
1466
|
+
f"~{_whole_dollars(l.fair_market_value)}", payoff, "none yet", "")
|
|
1467
|
+
continue
|
|
1439
1468
|
n = f"{l.sample_size}!" if l.low_confidence else str(l.sample_size)
|
|
1440
1469
|
table.add_row(l.grade_key, money(l.fair_market_value), signed_money(l.payoff), n,
|
|
1441
1470
|
_liquidity_text(l.liquidity))
|
|
@@ -1444,6 +1473,15 @@ def render_grading_desk(d: GradingDesk) -> None:
|
|
|
1444
1473
|
if any(l.low_confidence for l in d.lanes):
|
|
1445
1474
|
console.print(" [slab.dim]! = priced off very few sales — an anecdote, "
|
|
1446
1475
|
"not a market.[/]")
|
|
1476
|
+
estimates = [l.estimate for l in d.lanes if l.estimate]
|
|
1477
|
+
if estimates:
|
|
1478
|
+
info = d.glossary.get("grading.estimate")
|
|
1479
|
+
summary = info.summary if info else "estimated from similar cards — not a sale."
|
|
1480
|
+
console.print(f" [slab.warn]est.[/] [slab.dim]= {summary}[/]")
|
|
1481
|
+
for e in estimates:
|
|
1482
|
+
console.print(f" [slab.dim]{estimate_sentence(e)}[/]")
|
|
1483
|
+
if info:
|
|
1484
|
+
console.print(f" [slab.dim]{info.detail}[/]")
|
|
1447
1485
|
if any(l.liquidity for l in d.lanes):
|
|
1448
1486
|
console.print(" [slab.dim]Sells = how often that grade actually trades — a payoff "
|
|
1449
1487
|
"at a grade that sells twice a year is a longer wait than one that "
|
|
@@ -1460,6 +1498,9 @@ def render_grading_desk(d: GradingDesk) -> None:
|
|
|
1460
1498
|
if d.thin_data:
|
|
1461
1499
|
console.print(" [slab.warn]Thin data[/][slab.dim] — part of this reading rests on "
|
|
1462
1500
|
"1-2 sales. Treat it as a hint, not a market reading.[/]")
|
|
1501
|
+
if d.estimated:
|
|
1502
|
+
console.print(" [slab.warn]Estimated[/][slab.dim] — this reading uses an estimated price "
|
|
1503
|
+
"for a grade this card has never sold at, so it is a ballpark too.[/]")
|
|
1463
1504
|
console.print()
|
|
1464
1505
|
|
|
1465
1506
|
|
|
@@ -34,6 +34,7 @@ TEXT_MUTED = "#4a5a7a"
|
|
|
34
34
|
ACCENT = "#60a5fa" # blue
|
|
35
35
|
SUCCESS = "#34d399" # gains
|
|
36
36
|
DANGER = "#ef4444" # losses
|
|
37
|
+
WARN = "#f59e0b" # amber: caveats — thin data, unconfirmed grades, estimates
|
|
37
38
|
BORDER = "#2a3a5c" # slate card border
|
|
38
39
|
|
|
39
40
|
# Semantic style names — reference as `[slab.foil]…[/]` in markup, or via the helpers below.
|
|
@@ -48,6 +49,7 @@ SLAB_THEME = Theme({
|
|
|
48
49
|
"slab.accent": ACCENT,
|
|
49
50
|
"slab.gain": f"bold {SUCCESS}",
|
|
50
51
|
"slab.loss": f"bold {DANGER}",
|
|
52
|
+
"slab.warn": f"bold {WARN}",
|
|
51
53
|
"slab.heading": f"bold {FOIL}",
|
|
52
54
|
"slab.border": BORDER,
|
|
53
55
|
})
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|