copy original wmllint 1.4 into data/tools

Since esr is overwhelmingly the predominant author of early wmllint, I am importing it in the form of a patch from him, so that git blame will bear some resemblance to reality. Those interested in the full development history should refer back to the 1.4 branch.

git blame (without switches) ascribes the following lines to authors other than esr:

48a82a6f5 data/tools/wmllint-1.4   (Elias Pschernig 2007-05-31 19:06:25 +0000   77) from wesnoth.wmltools import *
4be7e8163 data/tools/wmllint-1.4   (Patrick Parker  2007-09-09 06:12:43 +0000   78) from wesnoth.wmliterator import *
68cb53470 data/tools/wmllint-1.4   (Gunter Labes    2007-07-11 21:09:36 +0000  261)         ("holy=", "arcane="),
68cb53470 data/tools/wmllint-1.4   (Gunter Labes    2007-07-11 21:09:36 +0000  291)     ),
c15a9fc9a data/tools/wmllint-1.4   (Gunter Labes    2007-09-20 16:43:35 +0000  295) 	("Halbardier" , "Halberdier"),
ea3323d98 data/tools/wmllint-1.4   (Patrick Parker  2007-09-06 01:57:09 +0000  948)     global versions
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1071)                 break
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1206)     # Garbage-collect any empty [attack] scopes left behind;
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1207)     # this is likely to happen with female-variant units.
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1208)     nullattack = True
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1209)     while nullattack:
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1210)         nullattack = False
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1211)         for i in range(len(lines)-1):
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1212)             if lines[i].strip() == "[attack]" and lines[i+1].strip() == "[/attack]":
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1213)                 nullattack = True
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1215)         if nullattack:
d84b7f63b data/tools/wmllint-1.4   (Jérémy Rosen    2007-09-08 07:51:22 +0000 1216)             lines = lines[:i] + lines[i+2:]
e542a2ada data/tools/wmllint-1.4   (Gunter Labes    2007-09-20 17:29:49 +0000 1469)         name_pos = wmlfind("name=", WmlIterator(lines, filename))
801aa3003 data/tools/wmllint-1.4   (Jérémy Rosen    2007-10-05 19:59:11 +0000 1487) [attack_anim]
801aa3003 data/tools/wmllint-1.4   (Jérémy Rosen    2007-10-05 19:59:11 +0000 1497) [/attack_anim]\
bc4e1d8f3 data/tools/wmllint-1.4   (Patrick Parker  2007-09-09 23:24:29 +0000 1552)     except IndexError:
bc4e1d8f3 data/tools/wmllint-1.4   (Patrick Parker  2007-09-09 23:24:29 +0000 1553)         has_map_content = False
a106067a8 data/tools/wmllint-1.4   (Mark de Wever   2007-05-27 16:19:33 +0000 1602)         if not map_only:
a106067a8 data/tools/wmllint-1.4   (Mark de Wever   2007-05-27 16:19:33 +0000 1603)             line = mfile.pop(0)
a106067a8 data/tools/wmllint-1.4   (Mark de Wever   2007-05-27 16:19:33 +0000 1604)             if verbose >= 3:
a106067a8 data/tools/wmllint-1.4   (Mark de Wever   2007-05-27 16:19:33 +0000 1605)                 sys.stdout.write(line + terminator)
a106067a8 data/tools/wmllint-1.4   (Mark de Wever   2007-05-27 16:19:33 +0000 1606)             lineno += 1
176b29319 data/tools/wmllint-1.4   (Mark de Wever   2007-10-28 10:53:53 +0000 1725)                 # Strip the starting positions out of the edges
176b29319 data/tools/wmllint-1.4   (Mark de Wever   2007-10-28 10:53:53 +0000 1726)                 outermap(lambda n: re.sub(r"[1-9] ", r"", n), outmap)
bb07ea830 data/tools/wmllint-1.4   (Mark de Wever   2007-10-28 09:03:10 +0000 1728)                 outermap(lambda n: n.replace(r"Gg^Fet", r"Gs^Fp"), outmap)
d725c7cdb data/tools/wmllint-1.4   (Gunter Labes    2007-08-24 04:54:04 +0000 1883) Usage: wmllint [options] [dir]
d725c7cdb data/tools/wmllint-1.4   (Gunter Labes    2007-08-24 04:54:04 +0000 1885)     Takes any number of directories as arguments.  Each directory is converted.
d725c7cdb data/tools/wmllint-1.4   (Gunter Labes    2007-08-24 04:54:04 +0000 1886)     If no directories are specified, acts on the current directory.
d725c7cdb data/tools/wmllint-1.4   (Gunter Labes    2007-08-24 04:54:04 +0000 1896)     -D, --diff                 Display diffs between converted and unconverted files.
ea3323d98 data/tools/wmllint-1.4   (Patrick Parker  2007-09-06 01:57:09 +0000 1903)     global versions
This commit is contained in:
Eric S. Raymond 2008-03-06 11:03:04 +00:00 committed by Groggy Dice
parent ffb34c2ffa
commit 8b0bce5d15

2139
data/tools/wmllint-1.4 Normal file

File diff suppressed because it is too large Load diff