#!/usr/bin/env python
"""
Copyright (C) 2013 SaraCraft Studios.
allanis@saracraft.net
"""
import sys
from xml.dom import minidom
import data

def main():
  sys.argv.remove(sys.argv[0]) # Remove self.
  for file in sys.argv:
    fp = open(file, 'rw+')
    doc = minidom.parse(file)
    data.write_proper_xml(fp, doc)
    doc.unlink()
    fp.close()

if __name__ == "__main__":
  main()

