script to generate thrift file