diff options
author | Håkon Solbjørg <hakon@solbj.org> | 2025-04-14 15:13:16 +0200 |
---|---|---|
committer | Håkon Solbjørg <hakon@solbj.org> | 2025-04-18 10:39:19 +0200 |
commit | 9b7d6fe5be6a68a4954a5f02c877d47086663d39 (patch) | |
tree | 6a8b4244477377cb9401ab7ff846e5f662d7f7c5 /tech-support/labels/planning_output.py | |
parent | 5aaf88e07130007016de778dce44f8ee88f01d56 (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.py | 14 |
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) |