From 79d42c43ab3f950e9254f385de3ed492eac0b52f Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Sun, 9 Aug 2026 15:13:56 -0400 Subject: [PATCH] The export summary admits the shelves page exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eric re-exported to see the new shelves page, got the same summary line as always, and reasonably concluded nothing happened — while the wall page sat freshly written on disk. A feature that ships silently looks like a no-op. The echo now reads "exported N game page(s) + the shelves page" and the summary dict carries shelves: bool, pinned by test. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_016jXZFSTZQKzAC8fqpWSz9g --- src/bggpipe/export.py | 4 +++- tests/test_export.py | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/bggpipe/export.py b/src/bggpipe/export.py index 3051012..98fcf60 100644 --- a/src/bggpipe/export.py +++ b/src/bggpipe/export.py @@ -743,8 +743,9 @@ def run_export( for line in failures: typer.echo(f" warning: cover not fetched — {line}") stale_note = f", {removed} stale page(s) removed" if removed else "" + shelves_note = " + the shelves page" if units else "" typer.echo( - f"exported {len(games)} game page(s) to {out_dir} " + f"exported {len(games)} game page(s){shelves_note} to {out_dir} " f"({downloaded} cover(s) downloaded, " f"{len(failures)} failed — re-run to retry{stale_note})" ) @@ -753,4 +754,5 @@ def run_export( "downloaded": downloaded, "failures": len(failures), "removed": removed, + "shelves": bool(units), } diff --git a/tests/test_export.py b/tests/test_export.py index dcf4f70..8154888 100644 --- a/tests/test_export.py +++ b/tests/test_export.py @@ -82,7 +82,13 @@ def test_export_writes_pages_art_and_no_shelf_photos(tmp_path): summary = run_export( cfg, out, title="Test Shelves", fetch=_cdn(log), sleep=lambda s: None ) - assert summary == {"games": 3, "downloaded": 3, "failures": 0, "removed": 0} + assert summary == { + "games": 3, + "downloaded": 3, + "failures": 0, + "removed": 0, + "shelves": False, + } index = (out / "index.html").read_text() assert "Test Shelves" in index and "Powered by BGG" in index @@ -384,7 +390,8 @@ def test_shelves_export_and_optout(tmp_path): ) save_locations(cfg, {"240:24621": {"opening_id": "den-b1", "note": ""}}) out = tmp_path / "site" - run_export(cfg, out, fetch=_cdn([]), sleep=lambda s: None) + summary = run_export(cfg, out, fetch=_cdn([]), sleep=lambda s: None) + assert summary["shelves"] is True # the run SAYS the wall shipped shelves = (out / "shelves" / "index.html").read_text() assert "Den Kallax" in shelves and "the wall behind the couch" in shelves