Skip to content

Commit

Permalink
🐛 Fixed to_stemma so that the input file and chron file both use slug…
Browse files Browse the repository at this point in the history
…ified witness labels
  • Loading branch information
jjmccollum committed Feb 7, 2025
1 parent f989492 commit 740c0a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion teiphy/collation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,12 @@ def to_stemma(self, file_addr: Union[Path, str]):
chron_file_addr = str(file_addr) + "_chron"
with open(file_addr, "w", encoding="utf-8") as f:
# Start with the witness list:
f.write("* %s ;\n\n" % " ".join([wit.id for wit in self.witnesses]))
f.write(
"* %s ;\n\n"
% " ".join(
[slugify(wit.id, lowercase=False, allow_unicode=True, separator='_') for wit in self.witnesses]
)
)
# f.write("^ %s\n\n" % chron_file_addr) #write the relative path to the chron file
f.write(
"^ %s\n\n" % ("." + os.sep + Path(chron_file_addr).name)
Expand Down

0 comments on commit 740c0a3

Please sign in to comment.