From f72d1d4aea58bf6bbb2d73c522e5c38c1b235991 Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Sat, 9 May 2020 20:46:13 -0400 Subject: [PATCH] filter_raw_char_data now associates star data --- aux/filter_raw_character_data | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/aux/filter_raw_character_data b/aux/filter_raw_character_data index 3eeeae3..4ab97d7 100755 --- a/aux/filter_raw_character_data +++ b/aux/filter_raw_character_data @@ -49,6 +49,12 @@ for key, entry in raw_json.items(): op_name = entry["appellation"] char_data[op_name] = parsed_data + + data = { + "name": op_name, + "stars": parsed_data["stars"] + } + if parsed_data["recruitment"] == 2: for tag in entry["tags"]: if tags[tag] not in en_recruitable: @@ -56,13 +62,13 @@ for key, entry in raw_json.items(): if tags[tag] not in cn_recruitable: cn_recruitable[tags[tag]] = [] - en_recruitable[tags[tag]].append(op_name) - cn_recruitable[tags[tag]].append(op_name) + en_recruitable[tags[tag]].append(data) + cn_recruitable[tags[tag]].append(data) elif parsed_data["recruitment"] == 1: for tag in entry["tags"]: if tags[tag] not in cn_recruitable: cn_recruitable[tags[tag]] = [] - cn_recruitable[tags[tag]].append(op_name) + cn_recruitable[tags[tag]].append(data) project_root = sys.argv[1]