From 936c53cafc24da2c5692e220ebcd16f75cc03f3e Mon Sep 17 00:00:00 2001 From: Zach H Date: Sat, 16 Jul 2016 21:22:17 -0400 Subject: [PATCH] final fixes; AllSets.json is a go! --- sql_to_json.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql_to_json.py b/sql_to_json.py index 894d391..350650a 100755 --- a/sql_to_json.py +++ b/sql_to_json.py @@ -62,6 +62,8 @@ def main(): if '"legalities":' in line: continue if '"source":' in line: continue + + if replace_and_write_these_keys(f2, line, "colorIdentity"): continue if replace_and_write_these_keys(f2, line, "colors"): continue if replace_and_write_these_keys(f2, line, "printings"): continue @@ -104,6 +106,10 @@ def str_to_json(line, key_val): while line.strip()[-1:] != "]": line = line[:-1] + + # BFM causes an issue, manual fix + if '"Scariest", "Creature"' in line: + line = line.replace('"You"ll"', '"You\'ll"') try: line = line[:line_index] + json.dumps(json.loads(line[line_index:]), indent=2) except: line = line