From 4a511dbe4b1cd8e1dc3f70fd3aa832b7044eb3c8 Mon Sep 17 00:00:00 2001 From: anor Date: Wed, 18 Nov 2026 02:32:35 +1000 Subject: [PATCH] =?UTF-8?q?fix(=D0=A2=D0=A1=D0=9D):=20=D1=81=D0=B1=D0=BE?= =?UTF-8?q?=D1=80=D0=BA=D0=B0=20=D0=BD=D0=B0=D1=85=D0=BE=D0=B4=D0=B8=D1=82?= =?UTF-8?q?=20=D0=B2=D1=8B=D0=B6=D0=B8=D0=BC=D0=BA=D0=B8=20=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B6=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ключ документа содержит косые черты, каталог получается глубже двух уровней — glob их пропускал и сборка видела 0 документов. Рекурсивный поиск; старая форма каталогов тоже находится. Co-Authored-By: Claude Code --- scripts/build_tsn_ref.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build_tsn_ref.py b/scripts/build_tsn_ref.py index e79985b..52a3f49 100644 --- a/scripts/build_tsn_ref.py +++ b/scripts/build_tsn_ref.py @@ -83,7 +83,9 @@ def _money_ok(w: dict) -> bool | None: def _docs(snapshots: Path): - for meta_path in sorted(snapshots.glob("snapshots/niac_tsn/*/*/meta.json")): + # ключ документа содержит косые черты («indices/nobook/выпуск 222»), + # поэтому глубина каталогов разная — ищем рекурсивно. + for meta_path in sorted((snapshots / "snapshots" / "niac_tsn").rglob("meta.json")): extract_path = meta_path.with_name("extract.json") if not extract_path.exists(): continue