Use note: lines for HTML metadata, not # comments

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-23 11:28:13 +03:30
parent 1b9848d14f
commit 4b4cf9aae8
8 changed files with 45 additions and 26 deletions

View File

@@ -18,13 +18,15 @@ RESET = "\033[0m"
def load_sample_names(path: Path) -> list[str]:
# Optional "NAME > REF": keep only the sample name (before ">").
# Skip "#" comments and "note: ..." metadata lines.
names = []
for line in path.read_text(encoding="utf-8").splitlines():
line = line.strip()
if line and not line.startswith("#"):
if ">" in line:
line = line.split(">", 1)[0].strip()
names.append(line)
if not line or line.startswith("#") or line.lower().startswith("note:"):
continue
if ">" in line:
line = line.split(">", 1)[0].strip()
names.append(line)
return names