Bnot fixes ; Missing énoncés fixes.

This commit is contained in:
sebastien committed 2026-10-23 11:15:05 +02:00
1 parent f39868207d
commit 55d5cf16c9
18 files changed
+486 -44

No files matched your search

+4 -1
View File
@@ -164,6 +164,7 @@ def rebuild(root: Path, mode: str, directory: Path, staging: Path, meta: dict,
from copienator.commands import annotating
from copienator.commands.reading_grouped_annotations import (
get_extra_pdfs_as_images,
save_checked_pdf,
save_paginated_pdf,
)
@@ -179,7 +180,7 @@ def rebuild(root: Path, mode: str, directory: Path, staging: Path, meta: dict,
label for label, entry in info.items() if entry["not_empty"]
}
all_labels = utils.read_all_labels(root)
images, groups = [], []
images, groups, checked_images = [], [], []
seen_contexts = set()
order = sorted(bodies, key=utils.natural_key)
for label in order:
@@ -198,6 +199,7 @@ def rebuild(root: Path, mode: str, directory: Path, staging: Path, meta: dict,
if info[label]["not_empty"]:
images.append(image)
if label in filtered:
checked_images.append((label, image))
extras = get_extra_pdfs_as_images(root, label, annotating, all_labels,
seen_contexts=seen_contexts) if mode == "BGnot" else []
groups.append([*extras, image])
@@ -212,6 +214,7 @@ def rebuild(root: Path, mode: str, directory: Path, staging: Path, meta: dict,
save_paginated_pdf(groups, staging / "Concat_F.pdf")
else:
stack([image for group in groups for image in group]).save(staging / "Concat_F.jpg")
save_checked_pdf(root, checked_images, all_labels, staging / "Concat_F.pdf")
def stage_baseline(root: Path, mode: str, output: Path, staging: Path,