Guide d'utilisateur GUI ; Recoverable statement/Persp Gemini generation

This commit is contained in:
sebastien committed 2026-10-05 09:04:01 +02:00
1 parent 2f8422f6d5
commit 94ca8b8256
9 files changed
+1333 -170

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
"""Shared inventory of usable, individual Persp files."""
from pathlib import Path
def present_rubric_labels(root: Path, labels: list[str]) -> list[str]:
present = []
for label in labels:
path = root / 'Persp' / label.replace('/', '_')
if not path.is_file():
continue
try:
content = path.read_text(encoding='utf-8').strip()
except UnicodeError:
continue
lines = content.split('\n', 1)
body = lines[1].strip() if lines[0].strip() == label and len(lines) > 1 else content
if body and body != label and not any(
(ord(char) < 32 and char != '\n') or ord(char) == 127 for char in content
):
present.append(label)
return present