From 2ee824937c8f7ff254c313aae367a8f8a4f55d14 Mon Sep 17 00:00:00 2001 From: Jasper van den Bosch Date: Wed, 9 Oct 2024 23:47:30 +0100 Subject: [PATCH 1/2] node title property --- syrinx/read.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syrinx/read.py b/syrinx/read.py index 5f022d2..c0b2cc0 100644 --- a/syrinx/read.py +++ b/syrinx/read.py @@ -26,6 +26,10 @@ def __init__(self): self.branches = [] self.sequenceNumber = SYS_MAX_SIZE + @property + def title(self) -> str: + return self.name.replace('_', ' ').title() + def reorder_children(node: ContentNode): node.leaves = sorted(node.leaves, key=lambda n: (n.sequenceNumber, n.name)) node.branches = sorted(node.branches, key=lambda n: (n.sequenceNumber, n.name)) From 9129ae9d1b1c1b4b861d0e0c3abaa4980d79c3f0 Mon Sep 17 00:00:00 2001 From: Jasper van den Bosch Date: Wed, 9 Oct 2024 23:49:20 +0100 Subject: [PATCH 2/2] bumped version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eb472e5..f5e522d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "syrinx" -version = "0.0.6" +version = "0.0.7" authors = [ { name="Jasper van den Bosch"}, ]