aboutsummaryrefslogtreecommitdiffstats
path: root/tech-support/labels/planning_output.py
diff options
context:
space:
mode:
authorHåkon Solbjørg <hakon@solbj.org>2025-04-14 15:13:16 +0200
committerHåkon Solbjørg <hakon@solbj.org>2025-04-18 10:39:19 +0200
commit9b7d6fe5be6a68a4954a5f02c877d47086663d39 (patch)
tree6a8b4244477377cb9401ab7ff846e5f662d7f7c5 /tech-support/labels/planning_output.py
parent5aaf88e07130007016de778dce44f8ee88f01d56 (diff)
feat: Support reading from (planning output) file
Diffstat (limited to 'tech-support/labels/planning_output.py')
-rw-r--r--tech-support/labels/planning_output.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tech-support/labels/planning_output.py b/tech-support/labels/planning_output.py
new file mode 100644
index 0000000..934dc83
--- /dev/null
+++ b/tech-support/labels/planning_output.py
@@ -0,0 +1,14 @@
+from gondul import _match_switches
+from gondul import _sort_switches
+
+def read_planning_switches(path, match=None):
+ lines = None
+ with open(path) as f:
+ lines = f.readlines()
+
+ switches = []
+ for line in lines:
+ switches.append(line.split(" ")[0])
+
+ switches = _match_switches(switches, match=match)
+ return _sort_switches(switches)