Difference between revisions of "CELayoutUpgrader"
(→Introduction) |
m (Robot: Cosmetic changes) |
||
Line 2: | Line 2: | ||
CELayoutUpgrader is a python script that can upgrade XML layout files to the Unified Coordinate System. Hopefully it will make life a little easier. See this [http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1766 message board thread]for discussion. | CELayoutUpgrader is a python script that can upgrade XML layout files to the Unified Coordinate System. Hopefully it will make life a little easier. See this [http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1766 message board thread]for discussion. | ||
− | =Download= | + | = Download = |
[[CELayoutUpgrader.py]]. | [[CELayoutUpgrader.py]]. | ||
− | =Dependencies= | + | = Dependencies = |
* [http://www.python.org/ Python] (any relatively recent version will do) | * [http://www.python.org/ Python] (any relatively recent version will do) | ||
* [http://pyxml.sourceforge.net/ PyXML] (0.8 and up should be fine) | * [http://pyxml.sourceforge.net/ PyXML] (0.8 and up should be fine) | ||
− | =Usage= | + | = Usage = |
python CELayoutUpgrader.py FILES | python CELayoutUpgrader.py FILES | ||
Line 16: | Line 16: | ||
FILES can be a glob-style pattern or a list of files. | FILES can be a glob-style pattern or a list of files. | ||
− | =Example= | + | = Example = |
If you have a directory with a bunch of .layout files in it, stick the script in that directory and run it like this: | If you have a directory with a bunch of .layout files in it, stick the script in that directory and run it like this: | ||
Line 22: | Line 22: | ||
<code>python CELayoutUpgrader.py *.layout</code> | <code>python CELayoutUpgrader.py *.layout</code> | ||
− | =How it works= | + | = How it works = |
It will parse the layout files you specified searching for old-style properties. | It will parse the layout files you specified searching for old-style properties. |
Revision as of 15:02, 26 February 2011
Introduction
CELayoutUpgrader is a python script that can upgrade XML layout files to the Unified Coordinate System. Hopefully it will make life a little easier. See this message board threadfor discussion.
Download
Dependencies
Usage
python CELayoutUpgrader.py FILES
FILES can be a glob-style pattern or a list of files.
Example
If you have a directory with a bunch of .layout files in it, stick the script in that directory and run it like this:
python CELayoutUpgrader.py *.layout
How it works
It will parse the layout files you specified searching for old-style properties. It will convert each one to the Unified Coordinate System equivalent. If the file already has some Unified Coordinate System properties, it will leave them in place. After upgrading each file, it will report how many properties it upgraded.