Commit graph

55 commits

Author SHA1 Message Date
Elvish_Hunter
4f667254c9 Ported wiki_grabber to Python 3 2019-09-29 11:07:59 +02:00
Michał Janiszewski
9d333bc95a Compare to None using identity is operator
This is a trivial change that replaces `==` operator with `is` operator, following PEP 8 guideline:

> Comparisons to singletons like None should always be done with is or is not, never the equality operators.

https://legacy.python.org/dev/peps/pep-0008/#programming-recommendations
2018-10-31 12:21:01 +11:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0
(cherry-picked from commit bc4d22dc72)
2018-10-07 03:23:36 +00:00
Charles Dang
fda7bf63af Used more attractive table style when exporting data to wiki 2017-06-06 22:00:37 +11:00
Severin Glöckner
06d9909c86 Changed Shebang line of python scripts.
It's mostly about making the scripts run if python defaults to python3.
Has been tested for each script.
2016-11-25 09:57:25 +01:00
Thibault Févry
8241e0c419 Fix typos in utils/wiki_grabber.py 2013-08-24 19:18:49 +02:00
Eric S. Raymond
043c4f9fd3 Remove $Id$ cookies. 2013-03-26 21:41:37 -04:00
Thibault Févry
35ee1e6725 Strip trailing whitespaces.
Some other changes to make code look more pythonish. No important changes.
2011-10-21 23:42:46 +00:00
Sytyi Nick
c39a96c3e5 Updated annotation regex 2011-08-10 21:54:24 +00:00
Mark de Wever
340e0fe16a Add fix for empty last field for the wiki grabber.
Whether or not the last field can be empty is a property of the field
and not of the record terminator.
2011-07-30 10:42:55 +00:00
Mark de Wever
b11e53220c Update the annotations.
Also fixes:

- A type usage in the canvas.

- The wiki grabber properly ignore an @allow.

Applies patch #2629.
2011-07-17 14:48:07 +00:00
Mark de Wever
3c5b34d214 Add initial version of the schema validator.
Committing Sytyi's patch.
2011-07-04 22:32:10 +00:00
Mark de Wever
ac63238411 Improve the wiki grabber validation.
Also add escapes for & and $ in a table and use it at one place.
2011-04-16 09:07:19 +00:00
Mark de Wever
0b4c2b8e1c Update config table wiki parser.
Minor change in whitespace, no real change in the output.
2011-04-14 18:40:21 +00:00
Mark de Wever
25c6f03fb5 Update formula table syntax.
This change has no changes to the output.
2011-04-14 18:40:11 +00:00
Mark de Wever
33fa0b39db Update the variable_types syntax.
This change has no changes to the output.
2011-04-14 18:40:05 +00:00
Mark de Wever
b186252cc8 Update the window_overview syntax.
This change has no changes to the output.
2011-04-14 18:39:57 +00:00
Mark de Wever
676f3958db Let a string field contain at least one character. 2011-04-14 18:39:51 +00:00
Mark de Wever
038581f8fa Improve the dialog_widgets handling.
This also fixes the field separator when an empty field occurs. The
output is different, but only changes whitespace.
2011-04-14 18:39:45 +00:00
Mark de Wever
83b7ae4f4c Improve widget_overview wiki comment handling.
- Uses a new way to get the regex.

- Allow `nicer' line wrapping.

The next commit will update the formatting used, the output remains
unchanged with this commit.
2011-04-14 18:39:36 +00:00
Mark de Wever
0691d83ddd Add better input validation to the wiki grabber.
Some errors were silently ignored and thus input was silently lost.
2011-04-14 18:39:21 +00:00
Thibault Févry
3b7e87fc93 Use 'key in dict' instead of deprecated 'dict.has_key(key)' 2011-03-25 19:48:21 +00:00
Mark de Wever
d776161ab8 Change the wiki grabber macro definition.
Now looks more like the description part, backwards compability layer is
still there. (The output of the wiki grabber tool didn't change with
this commit.)
2011-03-14 20:36:58 +00:00
Thibault Févry
920a1aa26e Make wiki_grabber.py handle nest levels for descriptions.
Also remove the dirty whitespace hack.
2011-03-02 20:13:28 +00:00
Mark de Wever
f4b3a949fc Add the new wml_reference description.
This will allow to document the WML reference in the source code. The
nesting works a bit hacky but will be improved later. (Patch by
iwontbecreative for the GCI project.)
2011-01-09 17:09:20 +00:00
Mark de Wever
e6e02be5d2 Apply patch #2263; Wikigrabber cleanup. 2010-12-21 21:18:42 +00:00
Mark de Wever
2b8a5fb038 Update wiki comment format.
Changes the format and converts the comment in the code.
(Applies patch #2261.)
2010-12-20 21:08:42 +00:00
Mark de Wever
03dd1fa87e Cleanup and hardening patch for wiki_grabber.py.
Using more standard Python code and protects against non-existing input
or output directories. (Patch 2255.)
2010-12-11 21:27:38 +00:00
Mark de Wever
55b30f6081 Let use wikigrabber use parameters.
This removes the old hard-coded paths, the defaults are the same as the
hardcoded paths to remain backwards compatible.

The patch was provided by Natan Yellin as a GCI contribution.
2010-12-11 18:09:50 +00:00
Mark de Wever
715a14e26a Small documentation update for wikigrabber. 2010-12-11 15:26:50 +00:00
Mark de Wever
a6feb1e5c5 Applying a cleanup patch for wiki_grabber.py.
Applying patch #2254 by iwontbecreative.
2010-12-11 14:52:12 +00:00
Mark de Wever
cbf7cf7164 Remove unused deprecated grid table. 2010-08-31 21:02:58 +00:00
Mark de Wever
0868d8044b Deprecate the grid table in the wiki_grabber. 2010-08-31 21:01:52 +00:00
Mark de Wever
6fbdabf0e6 Add a new table format for widgets in a dialog.
The old format worked, but the parsing felt awkward and was hard to
remember. The new format is easier to remember and parse.
2010-05-02 13:18:44 +00:00
Mark de Wever
a069bc85e5 Add a few more hyperlinks in the documentation. 2010-05-02 11:20:21 +00:00
Mark de Wever
2c3a3dace5 Indent the sub items in the wiki grabber. 2009-08-19 20:27:03 +00:00
Mark de Wever
a99df97d7a Add a new table format to the wiki grabber.
The name grid is better as container so renamed the table and deprecated
to old name. The new name has a slightly different format and is still
work in progress. Also converted one table for testing purposes.
2009-08-18 21:00:55 +00:00
Mark de Wever
5df10f06cb Add preprocessor macros to the wiki grabber.
This allows to copy information about widgets at three places without
copy pasting and it's bugs. The three places are:

- In the widget overview list

- In the widget definition info

- In the widget instanciate info
2009-07-19 18:45:28 +00:00
Mark de Wever
389ddde392 Add some info about the tool upon esr's request. 2009-03-08 18:44:34 +00:00
Mark de Wever
41e89208af Cleanup the output of the container table. 2009-03-08 13:12:58 +00:00
Mark de Wever
16693906e5 Make a link the instance in the widget overview. 2009-03-08 10:24:54 +00:00
Mark de Wever
577976fbf5 Wiki comment can also be in header files.
This is somewhat uncommon, but there are some private headers with comment.
2009-03-08 10:24:50 +00:00
Mark de Wever
d852e87bd6 Cleaned up code for the window list. 2009-03-08 10:24:37 +00:00
Mark de Wever
50a01f3376 Cleaned up the widget list. 2009-03-08 10:24:30 +00:00
Mark de Wever
05b2176f94 Add an extra formatting option to the grabber.
Also cleaned up the source of the grabber slightly. Used the new
formatting at some places.
2009-03-07 21:31:40 +00:00
Mark de Wever
22886e3d2a Fix the output for negative numbers in a cell.
When the text starts with a negative number it's parsed as a new row, by
adding a space in front of all texts this problem is fixed. Cells with
hardcoded text this isn't needed so not done.
2008-08-24 09:58:23 +00:00
Mark de Wever
484230845f Add support for container tables. 2008-07-19 15:33:35 +00:00
Mark de Wever
964a0fcab4 Add a extra \n to the table data,
...this avoids the last line not to be displayed when there's no extra
\n in the data.
2008-07-19 08:08:55 +00:00
Mark de Wever
60bb964163 Make the default value match for a variable non-greedy.
This avoids the problem where a closing brace in the description was
seen as terminator.
2008-07-19 07:58:54 +00:00
Mark de Wever
2283975313 Add some error output...
...so we can see something went wrong instead of grepping through the
output.
2008-07-19 07:45:22 +00:00