Support per-sample Delta-E references via NAME > REF
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,13 +17,13 @@ RESET = "\033[0m"
|
||||
|
||||
|
||||
def load_sample_names(path: Path) -> list[str]:
|
||||
# A leading "*" marks the Delta-E reference sample; strip it to get the name.
|
||||
# Optional "NAME > REF": keep only the sample name (before ">").
|
||||
names = []
|
||||
for line in path.read_text(encoding="utf-8").splitlines():
|
||||
line = line.strip()
|
||||
if line and not line.startswith("#"):
|
||||
if line.startswith("*"):
|
||||
line = line[1:].strip()
|
||||
if ">" in line:
|
||||
line = line.split(">", 1)[0].strip()
|
||||
names.append(line)
|
||||
return names
|
||||
|
||||
|
||||
Reference in New Issue
Block a user