Commit graph

1944 commits

Author SHA1 Message Date
Elvish_Hunter
a8199e9406 wmllint gui: made some options in the wmlscope tab evenly spaced 2014-05-29 12:19:38 -07:00
Elvish_Hunter
b89a04056a wmllint gui: fixed a bug in regexp handling 2014-05-29 12:13:25 -07:00
Alexander van Gessel
21f3a01f95 Fix a wmllint crash 2014-05-28 17:55:07 +02:00
Charles Dang
0fcbb0a163 Backported Elvish_Hunter's wmltools GUI from master 2014-05-25 11:44:29 +11:00
Groggy Dice
b7b8e54c06 html.py: hone regexes for URL linking
First, a couple of extraneous quotes were left in the second regex around
"</a>".

Second, it is possible that a period or question mark could be used to end
a sentence, rather than be part of the URL. So check that these characters
are followed by an alphanumeric character to make them part of the URL.
2014-05-16 01:46:42 -04:00
Groggy Dice
625f22e595 wmllint: add option to turn off missing side= key warning 2014-05-16 01:46:33 -04:00
Groggy Dice
be1fc5a6de wmllint: put off dryrun's verbosity check until after options are processed
Per discussion with Elvish Hunter on the forum. Having dryrun check for a
minimum verbosity level during the options for loop meant that -vd would
set the verbosity level to 1, while -dv would set it to 2.
2014-05-16 01:46:16 -04:00
Groggy Dice
02aff87a26 wmllint: warn about no side key in [*_shroud],[gold],[modify_side/ai]
Those who are updating from old UMC may otherwise be caught unawares by the
change from defaulting to side 1 when the side key is missing, to all
sides. Later we will have an option to turn off this warning.

Since the insertion of an attribute line is now commented out, it may be
questioned whether this still belongs in hack_syntax. However, at some
point the plan is to give users an option to insert the side= key.
2014-05-16 01:45:13 -04:00
Groggy Dice
58c8e35b5e wmllint: warn about no side key in [set/(dis)allow_recruit],[store_gold]
Those who are updating from old UMC may otherwise be caught unawares by the
change from defaulting to side 1 when the side key is missing, to all
sides. Later we will have an option to turn off this warning.
2014-05-16 01:45:10 -04:00
Groggy Dice
f859ceee06 style.css: no margin-bottom for <pre> 2014-05-16 01:45:07 -04:00
Groggy Dice
1ff17d1d9b html.py,style.css: use <pre> with no top-margin on all descriptions
After my last change dealing with this issue, I noticed that descriptions
with <pre> had an extra blank line at the top. Adding top-margin to the
CSS file made this go away, but it also made the <br/> superfluous. Thus,
it is simpler just to have every description use <pre> instead of <br/>.

This should finally resolve everything having to do with the add-on
descriptions.

If I'd noticed that the re module hadn't been imported, I probably wouldn't
have considered URL linking to be important enough to do so. Since I've
already written the code, however, I'll keep it.
2014-05-07 06:14:48 -04:00
Groggy Dice
a08fe82f2a html.py: replace Windows backslashes in icon paths
This is one source of missing-image results.

There remain other reasons for missing icons. The script doesn't find images
in add-ons. And when resources are moved or renamed, they are no longer found
by the script, even if they had been found before.

Also, capitalize a sentence.
2014-05-05 04:05:39 -04:00
Groggy Dice
acafb98bde style.css,html.py: use <pre> instead of <br/>; re.sub instead of re.finditer
After looking into it some more, I think I've figured out how to handle <pre>
in the CSS. So, use that, when description has more than one line.

Also, go to re.sub for turning URLs into links. The version of Python I was
testing my code on wasn't properly handling backreferences in the replacement
string when in the form "\#", causing me to use finditer instead of sub. But
I've discovered that it does handle backreferences in the form "\g<#>". So
switch to much simpler re.sub code.
2014-05-05 03:53:28 -04:00
Groggy Dice
219dc47817 html.py: import re module
Bugfix for last commit.
2014-04-25 02:46:57 -04:00
Groggy Dice
15899daee4 html.py: format add-on description for HTML
The description text does not get rendered very well on a webpage. One
solution might be to use pre-wrap/word-wrap in the CSS, but due to
differences between browsers, that's a can of worms (at least for me, I'm
not a web pro).

So, the not-so-elegant solution is to add <br/> to every line.

URLs are also not linked in the plain text. Although in modern browsers
you can select the text and right-click, it's still convenient to turn
them into actual links.
2014-04-25 01:29:21 -04:00
Groggy Dice
2740384796 wmllint: change "usage of" magic comment to re.search
There seems no particular reason to require that this magic comment be at
the very beginning of the line, so why not switch from re.match to
re.search.

Also, update comments to reflect the fact that UtBS no longer uses this
magic comment.

A suggestion has been made to get rid of this magic comment now that UtBS
is no longer using it, but it may still be in use in some UMC somewhere.
2014-04-25 01:28:56 -04:00
Ignacio R. Morelle
780cced9c2 terrain2wiki: wesnoth-old.git -> wesnoth.git 2014-03-02 19:17:30 -03:00
Alexander van Gessel
a6630a3a08 Revert "[wmlunits] Disable crashing chunk_start stuff someone added."
This reverts commit 8aa0febfde.
As spaces in filenames are now illegal, this is no longer a problem.
2014-02-24 02:45:42 +01:00
Ignacio R. Morelle
5e7b4ece1d campaignd: Serve 1.12 clients on port 15007 2014-02-21 21:59:14 -03:00
Ignacio R. Morelle
80172ee58f wam: Make our _info.cfg's look identical to the C++ client's
To achieve this, add the same leading comment section ("do no edit this
file", etc.) and use the same indentation format as the C++ engine, and
don't use quotes around the uploads attribute value (it's an integer).
2014-02-20 23:44:33 -03:00
Ignacio R. Morelle
baa566161b wam: Write title and type fields to _info.cfg like the C++ client does 2014-02-20 23:40:54 -03:00
Ignacio R. Morelle
dc15ae8d31 wesnoth_addon_manager: Add missing trailing newline to _info.cfg 2014-02-20 23:25:58 -03:00
Ignacio R. Morelle
46b278579b wesnoth_addon_manager: Make the portmap tuple more easily diffable 2014-02-20 22:36:50 -03:00
Ignacio R. Morelle
181c64d70d wmllint: Extend [terrain_type] aliasof conversion to def_alias 2014-02-20 04:46:33 -03:00
Ignacio R. Morelle
8e7242927d wmllint: Extend [terrain_type] aliasof conversion to mvt_alias 2014-02-20 04:43:56 -03:00
Ignacio R. Morelle
184af275eb wmllint: Ignore Mercurial .hg directories 2014-02-20 04:40:36 -03:00
Ignacio R. Morelle
dd4dc91a9e wmllint: Add a small comment block
This is documentation for e1852e6854.
2014-02-20 04:33:55 -03:00
Ignacio R. Morelle
e1852e6854 wmllint: Implement [terrain_type] aliasof conversion for changes in 1.11.[89]
Adds a text transform step for the aliasof attribute under
[terrain_type] accounting for several changes to base terrain aliasing
in Wesnoth 1.11.8 and 1.11.9, including:

 * 10854d4802 and related commits
 * c25849b7ea (Vit -> Vt in 1.11.9)

Just like usual terrain string conversions, this step can be disabled
for a specific line using # wmllint: noconvert.
2014-02-20 04:24:23 -03:00
Ignacio R. Morelle
93e6930593 wmllint: Spellcheck [terrain_type] editor_name= and help_topic_text= 2014-02-20 03:41:35 -03:00
Ignacio R. Morelle
16677d019e wmllint: Add check for [theme]s without an id 2014-02-20 02:05:43 -03:00
Ignacio R. Morelle
e2bc4a9de7 wmllint: Add check for user-visible [theme]s without a name or description 2014-02-20 02:03:28 -03:00
Ignacio R. Morelle
d16ec0cf9e wmllint: Add check for deprecated [theme] name= usage 2014-02-20 01:53:11 -03:00
Ignacio R. Morelle
a15f89e873 wmllint: Fix incorrect ToD schedule image substitution 2014-02-20 01:47:29 -03:00
Alexander van Gessel
bbe459927f Add a missing space 2014-02-17 05:28:25 +01:00
Elias Pschernig
ae3697d4e8 [wesnoth_addon_manager] Also upload sub-sections from the .pbl. 2014-02-16 23:08:26 +01:00
Elias Pschernig
10df18d7cf [wesnoth_addon_manager] Upload everything in the _server.pbl
There was no reason to filter the list of attributes, anything found in the _server.pbl is now also passed on to the addon server.
2014-02-16 21:12:34 +01:00
Elvish_Hunter
e4c87305dc wmllint: moved in_clear_menu_item check in a better position 2014-02-07 15:05:48 +01:00
Alexander van Gessel
242f0532f0 Derive from the correct exception class 2014-02-05 16:14:06 +01:00
Alexander van Gessel
e09305afac Exit if the build system can't be cloned 2014-02-05 16:12:59 +01:00
Allefant
a425c951c2 [wmlunits] show vision and jamming for a unit
(if available)
2014-02-02 13:35:56 +01:00
Allefant
8aa0febfde [wmlunits] Disable crashing chunk_start stuff someone added. 2014-01-29 17:44:22 +01:00
Allefant
167a370787 [wmlunits] Fixed addon units with non-ascii UIDs 2014-01-29 14:56:11 +01:00
Allefant
f4434f2df1 [wmlunits] more debugging 2014-01-29 13:42:40 +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
Groggy Dice
3f79e418a5 wmllint: report stored units never unstored or cleared
Keys from the dictionary of stored units are removed as the unit is
unstored or its variable cleared. However, I found that one character in
Legend of Wesmere, Urudin, is stored but apparently never unstored/cleared.
I figure it's best to report such cases.

This message does not include helpful information like the filename,
because that data was never stored in the dictionary. The dictionary was
designed on the presumption that all entries would have a matching unstore/
clear event, and I didn't think of this warning until I saw there was an
anomalous case. Those who get this error will just have to use grep!
2014-01-20 04:19:52 -05: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