import sys
import re

file = open(sys.argv[1]).read()
repl = re.sub("info .*\n","",file)
repl = re.sub("common lineHeight=([0-9]+) .*\n",r"\1\n",repl)
repl = re.sub("page .*\n","",repl)
repl = re.sub("chars .*\n","",repl)
repl = re.sub("char","",repl)
repl = re.sub(" (id=|x=|y=|width=|height=|xoffset=|yoffset=|xadvance=)(-?[0-9])",r"\2",repl)
repl = re.sub("page.*\n","\n",repl)
repl = re.sub(" +"," ",repl)


open(sys.argv[1],"w").write(repl)