From a9eb56beab0a66199b6fc7844132d28ba81174fa Mon Sep 17 00:00:00 2001 From: Christian Krinitsin Date: Sun, 18 May 2025 16:17:59 +0200 Subject: move project to gitlab directory --- output.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100755 output.py (limited to 'output.py') diff --git a/output.py b/output.py deleted file mode 100755 index 745081ae..00000000 --- a/output.py +++ /dev/null @@ -1,23 +0,0 @@ -from tomlkit import dumps -from os import path, makedirs - -def find_label(labels, keyword): - match = next((s for s in labels if f"{keyword}:" in s), None) - if not match: - return f"{keyword}_missing" - return match.replace(": ", "_") - -def write_file(file_path, string): - makedirs(path.dirname(file_path), exist_ok=True) - with open(file_path, "w") as file: - file.write(string) - -def output_issue(issue): - labels = issue['labels'] - issue_id = issue['id'] - toml_string = dumps(issue) - - target_label = find_label(labels, "target") - host_label = find_label(labels, "host") - accel_label = find_label(labels, "accel") - write_file(f"issues/{target_label}/{host_label}/{accel_label}/{issue_id}.toml", toml_string) -- cgit v1.2.3