wesnoth/data/tools
2018-01-08 23:45:23 +01:00
..
addon_manager wam: Fix HTML injection attack on the add-ons.wesnoth.org web interface 2017-07-24 03:05:34 -04:00
castle-cutter ran utils/wesnoth-optipng 2011-03-11 14:17:45 +00:00
emacs_mode Update of the wml emacs mode database. 2014-11-04 18:42:47 +01:00
exploder fix castle exploder 2010-03-12 17:20:07 +00:00
hexometer ran utils/wesnoth-optipng: 2011-03-27 11:06:40 +00:00
rmtrans Ran reindent so we don't use tabs. 2013-08-24 18:53:46 +02:00
unit_tree Use a more generic default value 2018-01-08 23:45:23 +01:00
vim Remove everything related to [editor_tool_hint]. 2013-12-31 12:29:44 +01:00
wesnoth wmliterator: Add function to detect [+tags] 2015-06-27 18:10:12 -03:00
about_cfg_to_wiki Revert "Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old"" 2013-08-09 00:13:46 +02:00
campaign2wiki.py Remove now useless code. Still a bug to fix with about links but other than that it works 2013-07-14 01:44:01 +02:00
expand-terrain-macros.py More range() genocide. 2013-08-09 00:13:03 +02:00
extractbindings Remove W604 pep8 warning on files. Use repr(x) instead of deprecated 2011-03-25 20:46:50 +00:00
GUI.pyw WML tools GUI: backported improvements from master 2015-04-07 17:42:02 +02:00
helpheader.html Update macro reference's header to match the live Glamdrol navbar 2010-09-29 04:10:01 +00:00
helptrailer.html website: New Year copyright update 2015-01-01 18:58:08 -03:00
imgcheck More range() genocide. 2013-08-09 00:13:03 +02:00
journeylifter Removed a lot of trailing whitespaces. Shouldn't be anymore in python scripts. 2011-03-12 02:22:21 +00:00
Makefile Exclude data/test from reindent target 2015-04-07 21:07:17 -03:00
README Update to add campaign2wiki.py information 2013-07-14 01:57:38 +02:00
scoutDefault.py Removed a lot of trailing whitespaces. Shouldn't be anymore in python scripts. 2011-03-12 02:22:21 +00:00
terrain2wiki.py terrain2wiki: wesnoth-old.git -> wesnoth.git 2014-03-02 19:17:30 -03:00
trackplacer More range() genocide. 2013-08-09 00:13:03 +02:00
wesnoth_addon_manager wam: Use a tuple for the --change-passphrase argument's metavar 2014-06-12 00:29:59 -04:00
wmlflip Fix indent. 2013-08-24 18:47:00 +02:00
wmlindent wmlindent: backported b6250ff 2015-05-29 11:48:56 +02:00
wmllint wmllint: Ignore id in [trait] for unit id checks 2015-11-06 00:08:49 -03:00
wmllint-1.4 Set the executable bit on data/tools/wmllint-1.4 2014-01-12 23:40:03 -03:00
wmllint_gui More range() genocide. 2013-08-09 00:13:03 +02:00
wmlmove Fix indent. 2013-08-24 18:47:00 +02:00
wmlscope wmlscope: import glob for Windows shell 2014-08-01 04:34:56 -04:00
wmlunits [wmlunits] show vision and jamming for a unit 2014-02-02 13:35:56 +01:00
wmlvalidator Fix more typos. 2013-08-24 19:28:19 +02:00

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. Other utils are in utils/.

== Scripts ==

=== journeylifter ===

A program for converting campaigns to use trackplacer-format journey files.
All mainline campaigns have already been converted; this is for lifting UMC.

=== rmtrans ===

Remove nearly transparent pixels from images using GIMP. It currently affects
only one image at a time. Batch processing is available within GIMP, but it
would be useful to expand this to skip files where the pixels did not change.

=== 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.

=== wmlflip ===

Experimental tool that can hack a .cfg referring to a mapfile so that
all macros with X,Y coordinate pair arguments get their calls transformed
in a specified way.  Now supports only flipping the map around the Y
axis, but provides a framework that should make other transformations
easy.

=== 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.

=== wmllint_gui ===

A simple GUI interface for wmllint, to aid WML developers frightened of
the command line.

=== 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.

=== terrain2wiki.py ===

A script to create the "Terrain Table" on the TerrainCodeTableWML wiki page.
Run this and splice the output into the wiki whenever you add a new
terrain type to mainline.

=== campaign2wiki.py ===

A script that generates general information about mainline campaigns and
outputs wiki-ready output

== 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 wmltools.py for details

=== wmliterator.py ===

A WML codewalker class.  Not a full parser, but that's useful because
it doesn't get confused by unbalanced macros; instead it lets you
walk through lines in a text file parsing out tags and elements

=== 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.