remove convert_sprite_json (no longer needed)

This commit is contained in:
Colin McMillen 2020-03-04 16:47:24 -05:00
parent 654bb7fe97
commit 77f1d73097

View File

@ -1,36 +0,0 @@
#!/usr/bin/env python3
import glob
import os
import re
import sys
TEMPLATE = r"""<?xml version="1.0" encoding="utf-8" ?>
<XnaContent>
<Asset Type="System.String">
<![CDATA[
%s
]]>
</Asset>
</XnaContent>
"""
def main(args):
this_dir = os.path.dirname(os.path.realpath(__file__))
sneak_root = os.path.join(this_dir, '..', '..', '..')
os.chdir(sneak_root)
json_files = sorted(glob.glob('Content/sprites/**/*.json', recursive=True))
for json_file in json_files:
with open(json_file) as json:
outfile_name = re.sub(r'.json$', '_json.xml', json_file)
result = TEMPLATE % json.read()
with open(outfile_name, 'w') as out:
out.write(result)
return 0
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))