Ignacio R. Morelle
5985754786
wmlunits: Allow detecting wmlunits with the __WMLUNITS__ preprocessor symbol
...
This is an experimental attempt at enabling add-ons to either
voluntarily decrease unit tree bloat by defining a single campaign for
wmlunits (for multi-campaign add-ons), or disable unit tree generation
altogether by emiting an #error early.
2017-08-15 16:20:46 -03:00
Ignacio R. Morelle
5a675ec25d
wmlunits: Psyco is a defunct project and it never supported Python 3
2017-08-15 16:02:55 -03:00
Ignacio R. Morelle
abc0eb5d16
wmlunits: Get menu.js from the execution path, not the Wesnoth data dir
...
Otherwise we end-up with an obsolete version of menu.js from 1.12 when
reading 1.12 data.
2017-08-14 14:42:17 -03:00
Ignacio R. Morelle
a4172bddc1
wmlunits: Fix issue where the process name becomes "w" instead of "wmlunits"
...
The basic string type in Python 3 is equivalent to a wchar_t array,
which means that the second byte of every ASCII string is always zero,
causing the string to appear truncated after the first character when
calling C library functions that expect a single or multibyte encoding
(e.g. UTF-8). Just using a byte array does the trick to get a proper
single-byte ASCII string.
2017-08-14 13:59:09 -03:00
Ignacio R. Morelle
5bcaaaf9f7
wmlunits: style.css is not used anymore
2017-08-12 02:24:43 -04:00
Ignacio R. Morelle
9db2ed630c
wmlunits: More code clean-up
2017-08-12 02:24:07 -04:00
Ignacio R. Morelle
8bf57d6fe0
wmlunits: Wire in Wesmere header and trailer
2017-08-06 14:10:48 -04:00
Allefant
c17d556016
[units.wesnoth.org] fix eras with all eras in an addon
2017-06-25 21:38:20 -04:00
Elias Pschernig
b0f15a08c4
units.wesnoth.org update to understand new [difficulty] tag
2017-06-09 19:25:30 -04:00
Allefant
9f3ed8df4c
[wmlunits] apply zookeeper's suggested eras.cfg fix
2017-03-24 13:13:59 -04:00
Allefant
421f8ff70a
[wmlunits] fix inclusion of mainline eras
2017-01-24 23:51:21 -05:00
aquileia
809e61db88
Python scripts: Unify encoding magic comments
2016-05-03 22:12:19 +02:00
Elias Pschernig
1279214968
[wmlparser3] use less recursion when parsing
...
specifically, avoid recursion for every double double-quite (i.e. the
escaping of " as "")
2016-03-11 17:12:36 -05:00
Elias Pschernig
4c034d7705
Clean up wmlparser3.py a bit, fix json and xml output.
2015-09-20 14:53:49 -04:00
Elias Pschernig
f8fb04093a
[units.wesnoth.org] fix some small issues
2015-09-10 18:10:16 -04:00
Elias Pschernig
3ab3db3166
[units.wesnoth.org] Converted the script to Python 3.
...
Basically ran all .py files through 2to3. I made a copy of wmlparser2.py
called wmlparser3.py for the Python3 version, so as to not inconvenience anyone
who may be using it in their old Python2 scripts.
2015-09-09 22:52:23 -04:00
Elias Pschernig
2cdcae6294
[wmlunits] fix typo
2015-09-08 21:19:42 -04:00
Elias Pschernig
225234b121
[wmlunits: log used memory for pre-pass]
2015-09-08 20:56:14 -04:00
Elias Pschernig
310f8092ad
[units.wesnoth.org] update bash script
2015-03-28 16:09:01 +01:00
Elias Pschernig
ee047e7ce9
[units.wesnoth.org] Make WML parsing timeout a commandline argument.
2015-03-22 21:38:39 +01:00
Elias Pschernig
4872b1d91b
[units.wesnoth.org] Reduced timeout again to avoid out of memory.
2015-03-22 00:56:38 +01:00
Elias Pschernig
2d19275f6f
[units.wesnoth.org] Increase addon parsing timeout to 60 seconds.
2015-03-21 17:24:28 +01:00
Allefant
a425c951c2
[wmlunits] show vision and jamming for a unit
...
(if available)
2014-02-02 13:35:56 +01:00
Allefant
c182e93441
[wmlunits] fix debug message
...
(time to move this to Python3...)
2014-01-28 16:18:48 +01:00
Allefant
62ddbd2f81
[wmlunits] add some debug info
2014-01-27 23:10:34 +01:00
Allefant
91800c34c8
[wmlunits] for campaigns, define a difficulty
...
The first preprocessor symbol listed in a campaigns difficulties=...
attribute is now set when parsing WML looking for unit definitions.
2014-01-27 16:57:16 +01:00
Allefant
a83ae0ab08
[wmlunits] Filter out eras from dependencies
2014-01-21 02:07:23 +01:00
Allefant
754229ff22
[wmlunit] fix help
2014-01-19 21:34:26 +01:00
Allefant
7a653b1c12
[wmlunits] Also take dependencies into account for second pass.
2014-01-19 21:34:26 +01:00
Allefant
db98a2af1c
[wmlunits] Don't store translations which are the same.
2014-01-19 21:34:26 +01:00
Allefant
e8b930260f
[wmlunits] simplified dependencies
2014-01-18 16:39:36 +01:00
Allefant
0c4cd5a337
[wmlunits] implemented dependencies support
2014-01-17 18:13:45 +01:00
Allefant
e9430a02d1
[wmlunits] increase timeout for parsing user addons
2014-01-17 10:58:38 +01:00
Allefant
dc4670b897
[wmlunits] Don't abort un uncaught exceptions.
...
Instead keep going to the next addon during pre-parsing of user addons.
2014-01-16 17:45:46 +01:00
Alexander van Gessel
38b224c1ff
Revert "Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old""
...
This reverts commit 23b72d6956
.
2013-08-09 00:13:46 +02:00
Thibault Févry
23b72d6956
Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old"
...
This reverts commit 5fa5c03411
, reversing
changes made to 06374c64ba
.
2013-08-08 18:50:46 +02:00
Alexander van Gessel
2148f769f4
Move from optparse to argparse
2013-08-04 22:45:21 +02:00
Elias Pschernig
6632eaae33
[wmlunits] Fix error logging.
...
Now that a separate process is doing the WML parsing, need to serialize exceptions in the other process and send them to the main process to access them there.
2013-05-25 10:28:14 +02:00
Elias Pschernig
0b5c23db51
[wmlunits] Fork the process before parsing each addon...
...
...to allow recovery from out-of-mem.
2013-02-21 14:53:13 +00:00
Elias Pschernig
b0e4f12b57
[[wmlunits fix]]
...
- Fixed a bug in wmlunits where the era tree omitted units whose
parent units belonged to a different faction.
- Made wmlunits provide feedback about required parameters.
2012-08-23 18:11:50 +00:00
Elias Pschernig
aef708cbc4
[wmlunits] use SKIP_CORE when parsing mainline campaigns,
...
...automatic data/core parsing with --preprocess doesn't seem to work anymore
2012-06-24 13:03:08 +00:00
Elias Pschernig
ed0a21cb58
[wmlunits] Set extra_defines from [campaign] in addition to the campaign define.
2012-03-23 20:40:37 +00:00
Elias Pschernig
93a9a3a330
Added wiki output option to wmlunits.
2012-03-16 18:16:47 +00:00
Elias Pschernig
a295a6909f
[wmlunits] converted error log to html
2012-03-07 13:20:26 +00:00
Elias Pschernig
80b2ae2cf2
[wmlunits] Added per-addon log pages.
2012-03-04 23:11:15 +00:00
Elias Pschernig
182dc77281
[wmlunits] Handle [advancefrom] WML tags for units.
2012-03-04 14:20:20 +00:00
Elias Pschernig
3ebb10809c
[wmlunits] Add units from an era but without any faction...
...
...to a special "factionless" faction.
2012-03-03 18:01:06 +00:00
Elias Pschernig
1b105e75ee
[wmlunits] Ignore addon unit levels < 0 or > 5.
...
Ignore addons with unhandled errors.
2012-03-02 23:16:08 +00:00
Elias Pschernig
a09daf74ea
[wmlunits] Started working on a per-addon log...
...
...listing all the unit WML mistakes in the addon's unit definitions.
2012-03-02 21:23:09 +00:00
Elias Pschernig
e0537fec86
[wmlunits] On translated unit pages, stay on the same page...
...
...(in the new language) when changing languages instead of jumping
back to the overview.
2012-02-28 19:57:00 +00:00