<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Perseo</id>
	<title>The Battle for Wesnoth Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Perseo"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Perseo"/>
	<updated>2026-04-04T13:44:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Maintenance_tools&amp;diff=52781</id>
		<title>Maintenance tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Maintenance_tools&amp;diff=52781"/>
		<updated>2014-01-12T12:45:41Z</updated>

		<summary type="html">&lt;p&gt;Perseo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Wesnoth source code distribution includes a couple of tools intended to help authors maintain campaigns, faction &amp;amp; unit packs, and other WML resources. These&lt;br /&gt;
are:&lt;br /&gt;
 &lt;br /&gt;
; wmlscope: a cross-reference lister, useful for finding unresolved macro and resource-file references.&lt;br /&gt;
&lt;br /&gt;
; wmllint: a utility for sanity-checking WML syntax and porting your old WML to the current version of WML.  &lt;br /&gt;
&lt;br /&gt;
; wmlindent: a utility for reindenting WML to a uniform style.&lt;br /&gt;
&lt;br /&gt;
You will need a Python 2 interpreter on your system to use these tools.  Linux, *BSD, and Mac OS/X should already have Python 2 installed; for Windows it's a free download&lt;br /&gt;
from http://www.python.org.  You will also need to know how to run command-line tools on your system.&lt;br /&gt;
&lt;br /&gt;
If you're working with ubuntu you might have to install the package wesnoth-1.10-tools (or the convenient version).&lt;br /&gt;
 sudo apt-get install wesnoth-1.10-tools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All three tools will require you to supply a &amp;lt;i&amp;gt;directory list&amp;lt;/i&amp;gt;.  This is a set of directories containing the WML files you want to work on.&lt;br /&gt;
&lt;br /&gt;
This page is intended as ducementation for users.  A developer's-eye discussion of the design constraints on these tools, and their limitations, can be found here [https://mail.gna.org/public/wesnoth-dev/2010-02/msg00078.html].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Note to Windows Users:&amp;lt;/u&amp;gt; This means you have to run it from the '''Command Line'''. The command line may be reached by hitting Start, then Run, then &amp;quot;cmd&amp;quot; or &amp;quot;command&amp;quot; depending on your version of Windows.&lt;br /&gt;
&lt;br /&gt;
Example uses:&lt;br /&gt;
 python wmllint path\to\files&lt;br /&gt;
 python wmlindent path\to\files&lt;br /&gt;
&lt;br /&gt;
Another example:&lt;br /&gt;
 &amp;quot;C:\Program Files\Python2.4\python.exe&amp;quot; data\tools\wmllint --dryrun data\core data\{multiplayer,themes} data\campaigns &lt;br /&gt;
(You have to specify the full directory path to the executable if you don't have your environment variables set up correctly).&lt;br /&gt;
The first thing you type is the path to your python executable, followed by a space. The second thing you type is the path to the desired script to run, followed by a space. The third thing you type is the path to the folder (or file) to be processed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''A convenient way of running wmllint''' on Linux (Debian Lenny) and Windows (Xp) in comparison, '''Linux''':&lt;br /&gt;
&lt;br /&gt;
Assuming we're working with wesnoth 1.9 or more advanced versions (1.10 in this case).&lt;br /&gt;
 python2 /usr/share/games/wesnoth/1.10/data/tools/wmllint --dryrun /usr/share/games/wesnoth/1.10/data/core ~/.local/share/wesnoth/1.10/data/add-ons/A_Simple_Campaign 1&amp;gt;wmllint-run.log 2&amp;gt;wmllint-err.log&lt;br /&gt;
I have these commands inside of a file named&lt;br /&gt;
 wmllint_dryrun_ASC.sh&lt;br /&gt;
and execute it by opening a shell (=terminal, console, command window, bash,...), navigating into the directory with that file and typing&lt;br /&gt;
 bash wmllint_dryrun_ASC.sh&lt;br /&gt;
The python2 command should be automatically known on Debian. The path to the script tells the python interpreter what to execute. --dryrun: A wmllint option, see below. The path to the core files is needed to let wmllint know about e.g. defined core units, followed by the path to the add-on that shall be checked; the last two commands cause the result of the wmllint usage to be written into those files in the same directory as the script.&lt;br /&gt;
'''Windows''', this is logically exactly the same as the Linux shell script above, so if you are on a Mac you can probably conclude how you need to adapt the paths:&lt;br /&gt;
 E:\Python26\python.exe E:\Programme\Wesnoth_1.8_svn\data\tools\wmllint --dryrun E:\Programme\Wesnoth_1.8_svn\data\core E:\Programme\Wesnoth_1.8_svn\userdata\data\add-ons\A_Simple_Campaign 1&amp;gt;wmllint-run.log 2&amp;gt;wmllint-err.log&lt;br /&gt;
This is the content of a .txt file, whose extension I rename to .bat and double-click onto it. Opening a command window is not needed this way.&lt;br /&gt;
Since python isn't natively installed on windows and I don't have environment variables set, the full path to python.exe is given. If your directories contain spaces it may help to include the path in quotes:&lt;br /&gt;
 &amp;quot;C:\Programs\Battle for Wesnoth 1.8\data\tools\wmllint&amp;quot;&lt;br /&gt;
Remember that you do not need to enter all of the commands/paths at once. If it doesn't work, start with only &amp;quot;python&amp;quot; or &amp;quot;C:\Python26\python.exe&amp;quot; or the like and interpret the error messages that you get. If you get an &amp;quot;unknown command&amp;quot;, python isn't installed or environment variables aren't set correctly. After that, you can add the later commands one by one.&lt;br /&gt;
&lt;br /&gt;
== wmlscope ==&lt;br /&gt;
&lt;br /&gt;
The main use for &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; is to find WML macro references without definitions and references to resource files (sounds and images) that don't exist.  These are difficult to spot from in-game because they usually result in silence or a missing image rather than actual broken game logic.  They may happen because of typos in your WML, or because the name of a macro or the location of a resource file changed between versions of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; also checks macro invocations for consistency.  It will complain&lt;br /&gt;
if a macro is called with the wrong number of arguments.  In most cases it can deduce information about the type of the literal expected to be passed to a given macro argument by looking at the name of the formal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meanining&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Formals requiring this type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Literals of this type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;side&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a single side number&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SIDE, *_SIDE, SIDE[0-9]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric or &amp;quot;global&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;numeric&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric integer literal&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SIDE, X, Y, RED, GREEN, BLUE, TURN, PROB, LAYER, TIME, *_SIDE, *NUMBER, *AMOUNT, *COST, *RADIUS, *_X, *_Y, *_INCREMENT, *_FACTOR, *_TIME, *_SIZE, DURATION&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;\-?[0-9]+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;percentage&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a percentage&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*PERCENTAGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric or 0\.[0-9]+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;position&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a single x,y coordinate&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;POSITION, *_POSITION, BASE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;-?[0-9]+,-?[0-9]+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;span&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a set of coordinates or coordinate ranges&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*_SPAN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric, position or ([0-9]+\-[0-9]+,?|[0-9]+,?)+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;alliance&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a set of side numbers&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SIDES, *_SIDES&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a span, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;range&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an attack range&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;melee&amp;quot; or &amp;quot;ranged&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;alignment&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an alignment keyword&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ALIGN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;lawful&amp;quot; or &amp;quot;neutral&amp;quot; or &amp;quot;chaotic&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a set of unit types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TYPES&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a shortname, name, or anything that contains spaces and matches no other type&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;terrain_pattern&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a set of terrain codes to filter&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADJACENT*, TERRAINLIST*, *TERRAIN_PATTERN, RESTRICTING&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a terrain_code or name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;terrain_code&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a single terrain code, perhaps with overlay&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TERRAIN*, *TERRAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a shortname or (\*|[A-Z][a-z]+)\^([A-Z][a-z\\|/]+\Z)?&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;shortname&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a terrain code or a short, capitalized variable name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[A-Z][a-z][a-z]?&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a name or identifier&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NAME, VAR, IMAGESTEM, ID, FLAG, *_NAME, *_ID, NAMESPACE, BUILDER, *_VAR&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;anything without spaces that matches no other type&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;optional_string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a string value (may be empty)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ID_STRING, NAME_STRING, DESCRIPTION, IPF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a string, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a nonempty string not matching any of the preceding types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STRING, TYPE, TEXT, *_STRING, *_TYPE, *_TEXT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a shortname, a name, a stringliteral, or anything that contains spaces and matches no other type&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;stringliteral&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a string in doublequotes or a translated string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;.*&amp;quot; or _.* but not _[a-z].*&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;image&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an image path, perhaps with [[ImagePathFunctionWML|image path functions]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*IMAGE, PROFILE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[A-Za-z0-9{}.][A-Za-z0-9_/+{}.-]*\.(png|jpg)(?=(~.*)?)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;sound&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a music or sound filename&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MUSIC, SOUND&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string ending with &amp;quot;.wav&amp;quot; or &amp;quot;.ogg&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;filter&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[FilterWML|WML filter]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FILTER&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;any non-quoted string containing &amp;quot;=&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;WML&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;arbitrary WML fragment&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;WML, *_WML&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;any non-quoted string containing &amp;quot;=&amp;quot;, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;affix&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a prefix, suffix, or infix for a variable name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AFFIX, *AFFIX, POSTFIX, ROTATION&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a shortname or name, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;any&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;anything&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*VALUE, [ARS][0-9]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;anything&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the actual argument is a macro call {.*}, then it matches any formal  Otherwise, if the formal has an identifiable type, &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; will complain if the actual literal does not match it.&lt;br /&gt;
&lt;br /&gt;
The argument type check only works in macro calls that fit on a single line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; has many options for changing the reports it generates; the more advanced ones are intended for Wesnoth developers.  Invocations for the most commonly useful reports it generates are included in &amp;lt;i&amp;gt;data/tools/Makefile&amp;lt;/i&amp;gt; of the source distribution. Here are some of those reports:&lt;br /&gt;
&lt;br /&gt;
; make unresolved: Report on unresolved macro calls and resource references; also report macro argument-type mismatches.  (This is what you are most likely to want to do). &lt;br /&gt;
&lt;br /&gt;
; make all: Report all macro and resource file references, not just unresolved ones.&lt;br /&gt;
&lt;br /&gt;
; make collisions: Report on duplicate resource files.&lt;br /&gt;
&lt;br /&gt;
For more advanced users, or those who want to understand what the canned Makefile invocations are doing, here is a summary of &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt;'s options. Some of the more advanced options will require you to understand &lt;br /&gt;
[http://docs.python.org/lib/re-syntax.html Python regular expressions].&lt;br /&gt;
&lt;br /&gt;
; -h, --help:                 Emit a help message and quit&lt;br /&gt;
; -c, --crossreference:       Report resolved macro references (implies -w 1)&lt;br /&gt;
; -C, --collisions:           Report duplicate resource files   &lt;br /&gt;
; -d, --deflist:              Make definition list.  (This one is for campaign server maintainers.)&lt;br /&gt;
; -e &amp;lt;i&amp;gt;regexp&amp;lt;/i&amp;gt;, --exclude &amp;lt;i&amp;gt;regexp&amp;lt;/i&amp;gt;:   Ignore files matching the specified regular expression. &lt;br /&gt;
; -f &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;, --from &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;:         Report only on macros defined under &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;&lt;br /&gt;
; -l, --listfiles:            List files that will be processed&lt;br /&gt;
; -r &amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt;, --refcount=&amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt;:     Report only on macros with references in exactly &amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt; files.&lt;br /&gt;
; -u, --unresolved:           Report unresolved macro references&lt;br /&gt;
; -w, --warnlevel:            Set to 1 to warn of duplicate macro definitions&lt;br /&gt;
; --force-used reg:          Ignore reference count 0 on names matching regexp&lt;br /&gt;
; --extracthelp:              Extract help from macro definition comments.&lt;br /&gt;
&lt;br /&gt;
== wmllint ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; is a tool for migrating your WML to the current version.  It handles two problems: &lt;br /&gt;
&lt;br /&gt;
* Resource files and macro names may change between versions of the game. &amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; knows about these changes and will tweak your WML to fit where it can.&lt;br /&gt;
&lt;br /&gt;
* Between 1.2.x and 1.3.1 the terrain-coding system used in map files underwent a major change. It changed again in a minor way between 1.3.1 and 1.3.2.  &amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; will translate your maps for you, unless you use custom terrains in which case you will have to do it by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; also performs various sanity-checking operations, reporting:&lt;br /&gt;
&lt;br /&gt;
* unbalanced tags&lt;br /&gt;
* strings that need a translation mark and do not have them&lt;br /&gt;
* strings that have a translation mark and should not&lt;br /&gt;
* translatable strings containing macro references &lt;br /&gt;
* filter references by description= (id= in 1.5) not matched by an actual unit&lt;br /&gt;
* abilities or traits without matching special notes, or vice-versa&lt;br /&gt;
* consistency between recruit= and recruitment_pattern= instances&lt;br /&gt;
* double space after punctuation in translatable strings.&lt;br /&gt;
* unknown races or movement types in units&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; takes a directory-path argument specifying the WML directories to work on.  It will modify any cfg and map files under those directories that need to be changed.  Here is a summary of its options:&lt;br /&gt;
&lt;br /&gt;
; -h, --help:                 Emit a help message and quit.&lt;br /&gt;
; -d, --dryrun:               List changes but don't perform them.&lt;br /&gt;
; -v, --verbose:              Set verbosity; more details below.&lt;br /&gt;
; -c, --clean:                Clean up -bak files.&lt;br /&gt;
; -D, --diff:                 Show diffs between unconverted and unconverted files.&lt;br /&gt;
; -r, --revert:               Revert the conversion from the -bak files.&lt;br /&gt;
; -n, --nolift:               Suppress lifting, do sanity checks only &lt;br /&gt;
&lt;br /&gt;
The verbosity option works like this:&lt;br /&gt;
&lt;br /&gt;
; -v:          lists changes.&lt;br /&gt;
; -v -v:       warns of maps already converted.&lt;br /&gt;
; -v -v -v:    names each file before it's processed.&lt;br /&gt;
; -v -v -v -v: shows verbose parse details (developers only).&lt;br /&gt;
&lt;br /&gt;
The recommended procedure is this:&lt;br /&gt;
&lt;br /&gt;
# Run it with --dryrun first to see what it will do.&lt;br /&gt;
# If the messages look good, run without --dryrun; the old content will be left in backup files with a -bak extension.&lt;br /&gt;
# Eyeball the changes with the --diff option.&lt;br /&gt;
# Use wmlscope, with a directory path including the Wesnoth mainline WML, to check that you have no unresolved references.&lt;br /&gt;
# Test the conversion.&lt;br /&gt;
# Use either --clean to remove the -bak files or --revert to undo the conversion.&lt;br /&gt;
&lt;br /&gt;
Additionally, wmllint tries to locate a spell checker on your system and spell-checks storyline and message strings.  It will work automatically with either aspell, myspell, or ispell provided you have the &amp;lt;tt&amp;gt;enchant.py&amp;lt;/tt&amp;gt; Python library installed.&lt;br /&gt;
&lt;br /&gt;
== wmlindent ==&lt;br /&gt;
&lt;br /&gt;
Call with no arguments to filter WML on standard input to reindented WML on&lt;br /&gt;
standard output.  If arguments are specified, they are taken to be files to be&lt;br /&gt;
re-indented in place; interrupting will be safe, as each reindenting&lt;br /&gt;
will be done to a copy that is atomically renamed when it's done. This&lt;br /&gt;
code never modifies anything but blank lines and leading and trailing whitespace on non-blank lines.&lt;br /&gt;
&lt;br /&gt;
The indent unit is four spaces.  Absence of an option to change this is&lt;br /&gt;
deliberate; the purpose of this tool is to prevent style wars, not encourage&lt;br /&gt;
them.&lt;br /&gt;
&lt;br /&gt;
If you don't apply this tool to your own WML, the mainline-campaign maintainers &lt;br /&gt;
will do it when and if your code is accepted into the tree.&lt;br /&gt;
&lt;br /&gt;
Note: This tool does not include a parser.  It will produce bad results on WML&lt;br /&gt;
that is syntactically unbalanced.  Unbalanced double quotes that aren't part&lt;br /&gt;
of a multiline literal will also confuse it.  You will receive warnings&lt;br /&gt;
if there's an indent open at end of file or if a closer occurs with&lt;br /&gt;
indent already zero; these two conditions strongly suggest unbalanced WML.&lt;br /&gt;
&lt;br /&gt;
[[Category:Create]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>Perseo</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Maintenance_tools&amp;diff=52780</id>
		<title>Maintenance tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Maintenance_tools&amp;diff=52780"/>
		<updated>2014-01-12T12:45:03Z</updated>

		<summary type="html">&lt;p&gt;Perseo: The linux recomendations were outdated. I also added some more help.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Wesnoth source code distribution includes a couple of tools intended to help authors maintain campaigns, faction &amp;amp; unit packs, and other WML resources. These&lt;br /&gt;
are:&lt;br /&gt;
 &lt;br /&gt;
; wmlscope: a cross-reference lister, useful for finding unresolved macro and resource-file references.&lt;br /&gt;
&lt;br /&gt;
; wmllint: a utility for sanity-checking WML syntax and porting your old WML to the current version of WML.  &lt;br /&gt;
&lt;br /&gt;
; wmlindent: a utility for reindenting WML to a uniform style.&lt;br /&gt;
&lt;br /&gt;
You will need a Python 2 interpreter on your system to use these tools.  Linux, *BSD, and Mac OS/X should already have Python 2 installed; for Windows it's a free download&lt;br /&gt;
from http://www.python.org.  You will also need to know how to run command-line tools on your system.&lt;br /&gt;
&lt;br /&gt;
If you're working with ubuntu you might have to install the package wesnoth-1.10-tools (or the convenient version).&lt;br /&gt;
 sudo apt-get install wesnoth-1.10-tools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All three tools will require you to supply a &amp;lt;i&amp;gt;directory list&amp;lt;/i&amp;gt;.  This is a set of directories containing the WML files you want to work on.&lt;br /&gt;
&lt;br /&gt;
This page is intended as ducementation for users.  A developer's-eye discussion of the design constraints on these tools, and their limitations, can be found here [https://mail.gna.org/public/wesnoth-dev/2010-02/msg00078.html].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Note to Windows Users:&amp;lt;/u&amp;gt; This means you have to run it from the '''Command Line'''. The command line may be reached by hitting Start, then Run, then &amp;quot;cmd&amp;quot; or &amp;quot;command&amp;quot; depending on your version of Windows.&lt;br /&gt;
&lt;br /&gt;
Example uses:&lt;br /&gt;
 python wmllint path\to\files&lt;br /&gt;
 python wmlindent path\to\files&lt;br /&gt;
&lt;br /&gt;
Another example:&lt;br /&gt;
 &amp;quot;C:\Program Files\Python2.4\python.exe&amp;quot; data\tools\wmllint --dryrun data\core data\{multiplayer,themes} data\campaigns &lt;br /&gt;
(You have to specify the full directory path to the executable if you don't have your environment variables set up correctly).&lt;br /&gt;
The first thing you type is the path to your python executable, followed by a space. The second thing you type is the path to the desired script to run, followed by a space. The third thing you type is the path to the folder (or file) to be processed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''A convenient way of running wmllint''' on Linux (Debian Lenny) and Windows (Xp) in comparison, '''Linux''':&lt;br /&gt;
&lt;br /&gt;
Assuming we're working with wesnoth 1.9 or more advanced versions (1.10) in this case.&lt;br /&gt;
 python2 /usr/share/games/wesnoth/1.10/data/tools/wmllint --dryrun /usr/share/games/wesnoth/1.10/data/core ~/.local/share/wesnoth/1.10/data/add-ons/A_Simple_Campaign 1&amp;gt;wmllint-run.log 2&amp;gt;wmllint-err.log&lt;br /&gt;
I have these commands inside of a file named&lt;br /&gt;
 wmllint_dryrun_ASC.sh&lt;br /&gt;
and execute it by opening a shell (=terminal, console, command window, bash,...), navigating into the directory with that file and typing&lt;br /&gt;
 bash wmllint_dryrun_ASC.sh&lt;br /&gt;
The python2 command should be automatically known on Debian. The path to the script tells the python interpreter what to execute. --dryrun: A wmllint option, see below. The path to the core files is needed to let wmllint know about e.g. defined core units, followed by the path to the add-on that shall be checked; the last two commands cause the result of the wmllint usage to be written into those files in the same directory as the script.&lt;br /&gt;
'''Windows''', this is logically exactly the same as the Linux shell script above, so if you are on a Mac you can probably conclude how you need to adapt the paths:&lt;br /&gt;
 E:\Python26\python.exe E:\Programme\Wesnoth_1.8_svn\data\tools\wmllint --dryrun E:\Programme\Wesnoth_1.8_svn\data\core E:\Programme\Wesnoth_1.8_svn\userdata\data\add-ons\A_Simple_Campaign 1&amp;gt;wmllint-run.log 2&amp;gt;wmllint-err.log&lt;br /&gt;
This is the content of a .txt file, whose extension I rename to .bat and double-click onto it. Opening a command window is not needed this way.&lt;br /&gt;
Since python isn't natively installed on windows and I don't have environment variables set, the full path to python.exe is given. If your directories contain spaces it may help to include the path in quotes:&lt;br /&gt;
 &amp;quot;C:\Programs\Battle for Wesnoth 1.8\data\tools\wmllint&amp;quot;&lt;br /&gt;
Remember that you do not need to enter all of the commands/paths at once. If it doesn't work, start with only &amp;quot;python&amp;quot; or &amp;quot;C:\Python26\python.exe&amp;quot; or the like and interpret the error messages that you get. If you get an &amp;quot;unknown command&amp;quot;, python isn't installed or environment variables aren't set correctly. After that, you can add the later commands one by one.&lt;br /&gt;
&lt;br /&gt;
== wmlscope ==&lt;br /&gt;
&lt;br /&gt;
The main use for &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; is to find WML macro references without definitions and references to resource files (sounds and images) that don't exist.  These are difficult to spot from in-game because they usually result in silence or a missing image rather than actual broken game logic.  They may happen because of typos in your WML, or because the name of a macro or the location of a resource file changed between versions of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; also checks macro invocations for consistency.  It will complain&lt;br /&gt;
if a macro is called with the wrong number of arguments.  In most cases it can deduce information about the type of the literal expected to be passed to a given macro argument by looking at the name of the formal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meanining&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Formals requiring this type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Literals of this type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;side&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a single side number&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SIDE, *_SIDE, SIDE[0-9]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric or &amp;quot;global&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;numeric&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric integer literal&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SIDE, X, Y, RED, GREEN, BLUE, TURN, PROB, LAYER, TIME, *_SIDE, *NUMBER, *AMOUNT, *COST, *RADIUS, *_X, *_Y, *_INCREMENT, *_FACTOR, *_TIME, *_SIZE, DURATION&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;\-?[0-9]+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;percentage&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a percentage&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*PERCENTAGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric or 0\.[0-9]+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;position&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a single x,y coordinate&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;POSITION, *_POSITION, BASE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;-?[0-9]+,-?[0-9]+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;span&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a set of coordinates or coordinate ranges&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*_SPAN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric, position or ([0-9]+\-[0-9]+,?|[0-9]+,?)+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;alliance&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a set of side numbers&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SIDES, *_SIDES&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a span, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;range&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an attack range&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;melee&amp;quot; or &amp;quot;ranged&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;alignment&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an alignment keyword&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ALIGN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;lawful&amp;quot; or &amp;quot;neutral&amp;quot; or &amp;quot;chaotic&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a set of unit types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TYPES&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a shortname, name, or anything that contains spaces and matches no other type&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;terrain_pattern&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a set of terrain codes to filter&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADJACENT*, TERRAINLIST*, *TERRAIN_PATTERN, RESTRICTING&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a terrain_code or name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;terrain_code&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a single terrain code, perhaps with overlay&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TERRAIN*, *TERRAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a shortname or (\*|[A-Z][a-z]+)\^([A-Z][a-z\\|/]+\Z)?&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;shortname&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a terrain code or a short, capitalized variable name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[A-Z][a-z][a-z]?&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a name or identifier&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NAME, VAR, IMAGESTEM, ID, FLAG, *_NAME, *_ID, NAMESPACE, BUILDER, *_VAR&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;anything without spaces that matches no other type&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;optional_string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a string value (may be empty)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ID_STRING, NAME_STRING, DESCRIPTION, IPF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a string, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a nonempty string not matching any of the preceding types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STRING, TYPE, TEXT, *_STRING, *_TYPE, *_TEXT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a shortname, a name, a stringliteral, or anything that contains spaces and matches no other type&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;stringliteral&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a string in doublequotes or a translated string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;.*&amp;quot; or _.* but not _[a-z].*&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;image&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an image path, perhaps with [[ImagePathFunctionWML|image path functions]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*IMAGE, PROFILE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[A-Za-z0-9{}.][A-Za-z0-9_/+{}.-]*\.(png|jpg)(?=(~.*)?)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;sound&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a music or sound filename&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MUSIC, SOUND&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string ending with &amp;quot;.wav&amp;quot; or &amp;quot;.ogg&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;filter&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[FilterWML|WML filter]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FILTER&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;any non-quoted string containing &amp;quot;=&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;WML&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;arbitrary WML fragment&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;WML, *_WML&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;any non-quoted string containing &amp;quot;=&amp;quot;, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;affix&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a prefix, suffix, or infix for a variable name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AFFIX, *AFFIX, POSTFIX, ROTATION&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a shortname or name, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;any&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;anything&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*VALUE, [ARS][0-9]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;anything&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the actual argument is a macro call {.*}, then it matches any formal  Otherwise, if the formal has an identifiable type, &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; will complain if the actual literal does not match it.&lt;br /&gt;
&lt;br /&gt;
The argument type check only works in macro calls that fit on a single line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; has many options for changing the reports it generates; the more advanced ones are intended for Wesnoth developers.  Invocations for the most commonly useful reports it generates are included in &amp;lt;i&amp;gt;data/tools/Makefile&amp;lt;/i&amp;gt; of the source distribution. Here are some of those reports:&lt;br /&gt;
&lt;br /&gt;
; make unresolved: Report on unresolved macro calls and resource references; also report macro argument-type mismatches.  (This is what you are most likely to want to do). &lt;br /&gt;
&lt;br /&gt;
; make all: Report all macro and resource file references, not just unresolved ones.&lt;br /&gt;
&lt;br /&gt;
; make collisions: Report on duplicate resource files.&lt;br /&gt;
&lt;br /&gt;
For more advanced users, or those who want to understand what the canned Makefile invocations are doing, here is a summary of &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt;'s options. Some of the more advanced options will require you to understand &lt;br /&gt;
[http://docs.python.org/lib/re-syntax.html Python regular expressions].&lt;br /&gt;
&lt;br /&gt;
; -h, --help:                 Emit a help message and quit&lt;br /&gt;
; -c, --crossreference:       Report resolved macro references (implies -w 1)&lt;br /&gt;
; -C, --collisions:           Report duplicate resource files   &lt;br /&gt;
; -d, --deflist:              Make definition list.  (This one is for campaign server maintainers.)&lt;br /&gt;
; -e &amp;lt;i&amp;gt;regexp&amp;lt;/i&amp;gt;, --exclude &amp;lt;i&amp;gt;regexp&amp;lt;/i&amp;gt;:   Ignore files matching the specified regular expression. &lt;br /&gt;
; -f &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;, --from &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;:         Report only on macros defined under &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;&lt;br /&gt;
; -l, --listfiles:            List files that will be processed&lt;br /&gt;
; -r &amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt;, --refcount=&amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt;:     Report only on macros with references in exactly &amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt; files.&lt;br /&gt;
; -u, --unresolved:           Report unresolved macro references&lt;br /&gt;
; -w, --warnlevel:            Set to 1 to warn of duplicate macro definitions&lt;br /&gt;
; --force-used reg:          Ignore reference count 0 on names matching regexp&lt;br /&gt;
; --extracthelp:              Extract help from macro definition comments.&lt;br /&gt;
&lt;br /&gt;
== wmllint ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; is a tool for migrating your WML to the current version.  It handles two problems: &lt;br /&gt;
&lt;br /&gt;
* Resource files and macro names may change between versions of the game. &amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; knows about these changes and will tweak your WML to fit where it can.&lt;br /&gt;
&lt;br /&gt;
* Between 1.2.x and 1.3.1 the terrain-coding system used in map files underwent a major change. It changed again in a minor way between 1.3.1 and 1.3.2.  &amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; will translate your maps for you, unless you use custom terrains in which case you will have to do it by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; also performs various sanity-checking operations, reporting:&lt;br /&gt;
&lt;br /&gt;
* unbalanced tags&lt;br /&gt;
* strings that need a translation mark and do not have them&lt;br /&gt;
* strings that have a translation mark and should not&lt;br /&gt;
* translatable strings containing macro references &lt;br /&gt;
* filter references by description= (id= in 1.5) not matched by an actual unit&lt;br /&gt;
* abilities or traits without matching special notes, or vice-versa&lt;br /&gt;
* consistency between recruit= and recruitment_pattern= instances&lt;br /&gt;
* double space after punctuation in translatable strings.&lt;br /&gt;
* unknown races or movement types in units&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; takes a directory-path argument specifying the WML directories to work on.  It will modify any cfg and map files under those directories that need to be changed.  Here is a summary of its options:&lt;br /&gt;
&lt;br /&gt;
; -h, --help:                 Emit a help message and quit.&lt;br /&gt;
; -d, --dryrun:               List changes but don't perform them.&lt;br /&gt;
; -v, --verbose:              Set verbosity; more details below.&lt;br /&gt;
; -c, --clean:                Clean up -bak files.&lt;br /&gt;
; -D, --diff:                 Show diffs between unconverted and unconverted files.&lt;br /&gt;
; -r, --revert:               Revert the conversion from the -bak files.&lt;br /&gt;
; -n, --nolift:               Suppress lifting, do sanity checks only &lt;br /&gt;
&lt;br /&gt;
The verbosity option works like this:&lt;br /&gt;
&lt;br /&gt;
; -v:          lists changes.&lt;br /&gt;
; -v -v:       warns of maps already converted.&lt;br /&gt;
; -v -v -v:    names each file before it's processed.&lt;br /&gt;
; -v -v -v -v: shows verbose parse details (developers only).&lt;br /&gt;
&lt;br /&gt;
The recommended procedure is this:&lt;br /&gt;
&lt;br /&gt;
# Run it with --dryrun first to see what it will do.&lt;br /&gt;
# If the messages look good, run without --dryrun; the old content will be left in backup files with a -bak extension.&lt;br /&gt;
# Eyeball the changes with the --diff option.&lt;br /&gt;
# Use wmlscope, with a directory path including the Wesnoth mainline WML, to check that you have no unresolved references.&lt;br /&gt;
# Test the conversion.&lt;br /&gt;
# Use either --clean to remove the -bak files or --revert to undo the conversion.&lt;br /&gt;
&lt;br /&gt;
Additionally, wmllint tries to locate a spell checker on your system and spell-checks storyline and message strings.  It will work automatically with either aspell, myspell, or ispell provided you have the &amp;lt;tt&amp;gt;enchant.py&amp;lt;/tt&amp;gt; Python library installed.&lt;br /&gt;
&lt;br /&gt;
== wmlindent ==&lt;br /&gt;
&lt;br /&gt;
Call with no arguments to filter WML on standard input to reindented WML on&lt;br /&gt;
standard output.  If arguments are specified, they are taken to be files to be&lt;br /&gt;
re-indented in place; interrupting will be safe, as each reindenting&lt;br /&gt;
will be done to a copy that is atomically renamed when it's done. This&lt;br /&gt;
code never modifies anything but blank lines and leading and trailing whitespace on non-blank lines.&lt;br /&gt;
&lt;br /&gt;
The indent unit is four spaces.  Absence of an option to change this is&lt;br /&gt;
deliberate; the purpose of this tool is to prevent style wars, not encourage&lt;br /&gt;
them.&lt;br /&gt;
&lt;br /&gt;
If you don't apply this tool to your own WML, the mainline-campaign maintainers &lt;br /&gt;
will do it when and if your code is accepted into the tree.&lt;br /&gt;
&lt;br /&gt;
Note: This tool does not include a parser.  It will produce bad results on WML&lt;br /&gt;
that is syntactically unbalanced.  Unbalanced double quotes that aren't part&lt;br /&gt;
of a multiline literal will also confuse it.  You will receive warnings&lt;br /&gt;
if there's an indent open at end of file or if a closer occurs with&lt;br /&gt;
indent already zero; these two conditions strongly suggest unbalanced WML.&lt;br /&gt;
&lt;br /&gt;
[[Category:Create]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>Perseo</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Perseo&amp;diff=46509</id>
		<title>User:Perseo</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Perseo&amp;diff=46509"/>
		<updated>2012-04-23T18:17:51Z</updated>

		<summary type="html">&lt;p&gt;Perseo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Let me introduce myself first of all, I'm a spanish teenager and I love wesnoth and the way it works (the colaborations...) I like playing basketball, playing jazz (I play the clarinet) and I try to do my best at highschool.&lt;br /&gt;
&lt;br /&gt;
At the moment my work in Wesnoth is the following:&lt;br /&gt;
- Complete translation of Delfador's memoirs.&lt;br /&gt;
- Almost complete translation of the es.po file of help.&lt;br /&gt;
- Complete translation of an orcish incursion.&lt;br /&gt;
- A little campaign called &amp;quot;The northern tower&amp;quot; But it lack's talent and good English level so I don't encourage anyone to play it. Actually I got bored of it and I never finished the revision.&lt;br /&gt;
&lt;br /&gt;
And I'm working on:&lt;br /&gt;
- Translating more thing, nowadays I'm working on UTBS (april 2012)&lt;br /&gt;
- Doing a campaign for the Kalifate faction, but I don't know if I'll manage to finish it someday.&lt;br /&gt;
&lt;br /&gt;
Best regards!&lt;br /&gt;
Perseo&lt;/div&gt;</summary>
		<author><name>Perseo</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Perseo&amp;diff=44492</id>
		<title>User:Perseo</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Perseo&amp;diff=44492"/>
		<updated>2011-12-29T16:59:31Z</updated>

		<summary type="html">&lt;p&gt;Perseo: Created page with 'Working on official spanish translations and two UMC campaigns (correcting and fixing one and doing the other)'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Working on official spanish translations and two UMC campaigns (correcting and fixing one and doing the other)&lt;/div&gt;</summary>
		<author><name>Perseo</name></author>
		
	</entry>
</feed>