From da97f593abd0b3face2b56e5aec4af206629e03e Mon Sep 17 00:00:00 2001 From: reschan Date: Fri, 24 Jun 2022 10:01:31 +0700 Subject: [PATCH] remove old script --- py_script/atree_csv_to_json.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 py_script/atree_csv_to_json.py diff --git a/py_script/atree_csv_to_json.py b/py_script/atree_csv_to_json.py deleted file mode 100644 index 4c63d06..0000000 --- a/py_script/atree_csv_to_json.py +++ /dev/null @@ -1,24 +0,0 @@ -import csv -import json -import re - -with open('atree.csv', newline='') as csvfile: - res = "" - reader = csv.DictReader(csvfile) - for row in reader: - if not row["connector"]: - row["connector"] = False - else: - row["connector"] = True - row["row"] = int(row["row"]) - row["col"] = int(row["col"]) - if row["rotate"].isdigit(): - row["rotate"] = int(row["rotate"]) - else: - row.pop("rotate") - row["desc"] = re.sub("\n", " ", row["desc"]) - - resjson = json.dumps(row) - res += str(resjson) + ",\n" - - print(res)