Add sde icon script

This commit is contained in:
blitzmann
2016-06-28 23:34:39 -04:00
parent b9f0812b38
commit 06f402bb9d

22
scripts/sdeReadIcons.py Normal file
View File

@@ -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"