From 06f402bb9d1710e25463908cf139cede5ea0b068 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Tue, 28 Jun 2016 23:34:39 -0400 Subject: [PATCH] Add sde icon script --- scripts/sdeReadIcons.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 scripts/sdeReadIcons.py diff --git a/scripts/sdeReadIcons.py b/scripts/sdeReadIcons.py new file mode 100644 index 000000000..2284bf7e9 --- /dev/null +++ b/scripts/sdeReadIcons.py @@ -0,0 +1,22 @@ +''' +A change to EVE Online's cache format rendered Reverence unable to correctly dump the icons file. As a stop gap, this +reads the offical SDE iconIDs.yaml and populates our own icons.json file. This files should then be transferred to the +other JSON files Phobos dumps before being converted to SQL +''' + +import yaml +import json + +iconDict = {} + +stream = open(r"C:\path\to\sde\fsd\iconIDs.yaml", "r") +docs = yaml.load_all(stream) + +for doc in docs: + for k,v in doc.items(): + iconDict[str(k)] = {"iconFile": v['iconFile']} + +with open('icons.json', 'w') as outfile: + json.dump(iconDict, outfile) + +print "done" \ No newline at end of file