It's just a list of X, Y coordinates...
An untested python one-liner:
'\n'.join(["G0 X"+x+" Y"+y for x,y in coords])
Grab the code for homing and stuff from the start of another gcode file that works.