fix(ТСН): сборка находит выжимки вложенных ключей
Ключ документа содержит косые черты, каталог получается глубже двух уровней — glob их пропускал и сборка видела 0 документов. Рекурсивный поиск; старая форма каталогов тоже находится. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -83,7 +83,9 @@ def _money_ok(w: dict) -> bool | None:
|
|||||||
|
|
||||||
|
|
||||||
def _docs(snapshots: Path):
|
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")
|
extract_path = meta_path.with_name("extract.json")
|
||||||
if not extract_path.exists():
|
if not extract_path.exists():
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user