This script can be used to import and export WebGUI templates via the command line. Unpack the zip file and see the README for usage and details.
This updated version of the script now outputs head blocks when you dump templates.