Skip to content

Commit

Permalink
new cards
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePeeps191 committed Mar 8, 2024
1 parent ef8c056 commit 0a06fc7
Show file tree
Hide file tree
Showing 159 changed files with 971,021 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cards/edit_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
import json

os.mkdir("new_cards")

for file in os.listdir():
with open(file, encoding = "utf8") as f:
x = json.load(f)
for i in x:
i["id"] = i["id"].replace("pt", "")
i["legalities"] = [j for j in i["legalities"]]
with open(f"new_cards/{file.replace('pt', '')}", "w", encoding = "utf8") as f:
json.dump(x, f, indent = 4)
print("Done:", file)
Loading

0 comments on commit 0a06fc7

Please sign in to comment.