remove old script
This commit is contained in:
parent
e86152af18
commit
da97f593ab
1 changed files with 0 additions and 24 deletions
|
@ -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)
|
Loading…
Reference in a new issue