import sys

def main():
    
    sheetfile = sys.argv[1]

    result = []
    with open(sheetfile, 'r') as f:
        lines = f.readlines()
        for line in lines:
            details = line.rstrip('\n').split(' ')
            del details[1]
            print details
            result.append("render.data.frames.append(SpriteFrame(%s, %s, %s, %s)) //%s\n" % (details[1], details[2], details[3], details[4], details[0]))
    
    with open('sheetoutput.txt', 'w') as f:
        f.writelines(result)

if __name__ == "__main__" : main()

