wesnoth/data/tools
..
addon_manager
castle-cutter
emacs_mode
exploder
unit_tree
vim
wesnoth
.gitignore
about_cfg_to_wiki
expand-terrain-macros.py
extractbindings
helpheader.xhtml
helptrailer.xhtml
Makefile
README
scoutDefault.py
terrain2wiki.rb
trackplacer
wesnoth_addon_manager
wmlindent
wmllint
wmlmove
wmlscope
wmltest
wmlunits

Tools for hacking or generating WML, maps, images, and sounds belong here.
Tools for sanity-checking the mainline campaigns and associated data 
also belong here.

== Scripts ==

=== trackplacer ===

A visual editor for journey tracks, the icon sequences that appear on
Wesnoth story screens.

=== wesnoth_addon_manager ===

Command-line client for uploading WML content to and downloading from
the add-on server.

=== wmllint ===

This tool lifts WML from older dialects to current and performs sanity checks.
See the header comment of wmllint for a description and invocation options.

=== wmlscope ===

A WML cross-reference checker.  Normally you'll use this to list
unresolved symbols., if any.  See the header comment of wmlscope for a
description and invocation options.

=== wmlmove ===

Use this tool to generate commands that will move a unit between
namespaces; campaign to core, core to campaign, or campaign to
campaign.  See the header comment of wmlmove for a description and
invocation options.

=== wmlunits ===

List names of all units in mainline, either as a mediawiki table or
as HTML.

=== TeamColorizer ===

Map the magenta team-color patches in the input image to red in the
output image, copy the result to output.  (This script lives under
unit_tree).

=== extractbindings ===

Extract and format a list of keystroke bindings from a theme file.
Presently this generates a table suitable for wiki inclusion.

== Python API ==

=== wmltools.py ===

The main facility in this module is a cross-referencer class.  
It also contains utility methods for working with the data tree.
See the header comment of wmtools.py for details

=== wmlparser.py ===

This python module contains code originally developed for CampGen - it contains
a general WML Parser written in Python, just like the Perl one. So if you want
to develop tools in Python instead of Perl and need a WML parser, it may save
some time.

The API currently is very sparsely documented, but I plan to extend this. In
general, wmlparser.py contains the WML Parser, which is used like:

parser = wmlparser.Parser(datapath)

Then:

parser.parse_file(filename)
or
parser.parse_stream(file)
or
parser.parse_text(string)

to set what to parse, and finally:

wmldata = parser.parse()

to read everything into a Python representation of the parsed data.

=== wmldata.py ===

This file has several utility methods defined to access and manipulate
WML data.  Most of them will not be generally useful. An example:

for unit in  wmldata.get_all("unit"):
    print unit.get_text_val("id")

== Standalone use ==

=== wmlparser ===

If called standalone, wmlparser.py will parse whatever you give it and
dump back to stdout. For example:

python wmlparser.py -e {game.cfg} > game.dump

Should produce a nice several 100000 lines file of the complete configuration
with all included files and macros expanded to a single file.