Commit Graph

65 Commits

Author SHA1 Message Date
Pieter-Jan Briers 685dffb1d5 makerst.py refactor.
It's now smart and keeps track of every entity in the doc files. Now it can pick up on broken references and such inside the doc files.
Eventually we'll be able to run it on Travis and check for errors automatically.

General file cleanup.

References to elements of classes now have a prefix for their type. class_Control_minimum_size_changed becomes class_Control_method_minimum_size_changed, or signal_, because the reason I did this was to fix reference conflicts.

You can also reference constants now with BBCode.

Also made it use argparse, adding an --output and a --dry-run argument.

I did not fix all the errors it's reporting in the documentation files, there's about 150+ of them but that's outside of the scope of this commit.
2018-12-28 16:55:51 +01:00
Pieter-Jan Briers 15a3d16d08 Clean up & improve makerst.py
Man this file even had some semicolons in it.

I cleaned up the entire file, while it's still pretty ugly it's much better now.
I also added type checks so it passes mypy --strict.
make_type now throws a warning on unresolved type references, which there are a bunch of. I'm not responsible for fixing those though.
Also some more hardening against crashes. For example XML tags without content won't cause crashes now.
Functionality has not been modified as far as I can tell.

Update Makefile for Python 3

Fix ordering issues related to enums & constants
2018-12-27 13:57:08 +01:00
João Álvaro Ferreira a720993cc8 Enabled rst files to escape for parentheses after brackets 2018-12-11 12:58:57 +00:00
Rémi Verschelde 5f8af252e8 doc: Use HTTPS for docs.godotengine.org and point to latest branch
Fixes #23509.
2018-11-05 08:46:27 +01:00
lupoDharkael edcca5f7ad Dont use equality operators with None singleton in python files 2018-10-27 01:18:15 +02:00
LikeLakers2 0d6546ed44 Add extra newline after enum members and constants, to ensure they'll format properly after a multi-line description 2018-10-02 16:48:40 -04:00
Rémi Verschelde 0cc3aff8ed doc: Drop obsolete makemd.py, dates back to GitHub Wiki days
It has not been kept in sync with makerst.py, so it does not serve
much purpose nowadays.
2018-10-02 12:28:08 +02:00
Rémi Verschelde d26c6b28a6 doc: Fixes to rst converter 2018-09-21 09:50:21 +02:00
LikeLakers2 268ae71fae Fix the weird method linking issue when the previous method's description ends with a code block 2018-09-20 18:14:47 -04:00
Rémi Verschelde 4e0f415c83 doc: Make property sections in rst similar to editor docs
There is now an overview table with hyperlinks, and further down a detailed
list of properties with their setter/getter and description.

Theme items are now also included in the rst output.

Refactored make_method() a bit.
2018-09-13 02:13:19 +02:00
Rémi Verschelde a923eff9a4 Doc: Use PascalCase names in hyperlinks
We were not consistently applying .lower() every time we construct
an hyperlink, so there would be case mismatch. It works fine to keep
the natural case for those links.
2018-09-13 01:55:56 +02:00
Rémi Verschelde ba64ea2283 Doc: Use same headers and order in-editor and online 2018-09-12 17:12:23 +02:00
robojumper 98b59cf2a3 Add support for tutorial links to makerst.py
Also change the <tutorials> structure to make use of individual <link> tags
2018-06-12 17:40:24 +02:00
Rémi Verschelde 819911d16e makerst.py: Properly escape \ for rst
Fixes godotengine/godot-docs#1486.
2018-05-31 15:38:33 +02:00
Pieter-Jan Briers 331b0e8526 Makes doc methods display enums. 2018-05-12 20:08:39 +02:00
Viktor Ferenczi 272ecddb28 Properly closing all files in Python code 2018-03-11 14:55:50 +01:00
Yan Pas 059221f123 fixed md script 2018-02-18 17:13:47 +03:00
Anish 84e8c49f5d Documentation tool does not add escapes to code and codeblocks
Instead of adding the escapes to all * and _ the tool now excludes
the characters inside [code] and [codeblock].

Resolves: #15156
2018-02-16 02:24:05 +05:30
Joachim Meyer 3ca84df551 Enums get listed in the docs and enum members now also link to the
corresponding enum in the webdocs
Fixes #13254
2017-12-22 00:38:03 +01:00
Rémi Verschelde f5c513ca7b doc status: Partial revert of e23454d, setgets are no longer listed 2017-11-24 18:25:56 +01:00
Martin Capitanio 7c3ba6f72b Fix the class docs for the rst-syntax errors.
- Generate a correkt rst-syntax for the [/code] inline markup.
  (http://www.sphinx-doc.org/en/1.6.5/rest.html#inline-markup)
- Fix xml souce bugs

for the sphinx's rst syntax werrors:

class_area.rst:319: WARNING: Inline literal start-string without end-string.
class_area2d.rst:287: WARNING: Inline literal start-string without end-string.
class_audioserver.rst:287: WARNING: Inline literal start-string without end-string.
class_control.rst:509: WARNING: Inline literal start-string without end-string.
class_image.rst:422: WARNING: Inline literal start-string without end-string.
class_image.rst:434: WARNING: Inline literal start-string without end-string.
class_inputevent.rst:74: WARNING: Inline literal start-string without end-string.
class_inputeventaction.rst:45: WARNING: Inline literal start-string without end-string.
class_inputmap.rst:47: WARNING: Inline literal start-string without end-string.
class_kinematicbody.rst:80: WARNING: Inline interpreted text or phrase reference start-string without end-string.
class_kinematicbody2d.rst:80: WARNING: Inline interpreted text or phrase reference start-string without end-string.
class_line2d.rst:182: WARNING: Inline literal start-string without end-string.
class_thread.rst:51: WARNING: Inline literal start-string without end-string.
class_treeitem.rst:160: WARNING: Inline literal start-string without end-string.
2017-11-19 20:47:36 +01:00
Martin Capitanio ade4f3084c Fix class docs, improve error handling of the rst generator.
The rst-generator gives you now a hint what's going on:
Bad reference: 'method.RegEx.search_all' in file: ../modules/regex/doc_classes/RegExMatch.xml

grep 'method.RegEx.search_all' ../modules/regex/doc_classes/RegExMatch.xml
	Contains the results of a single regex match returned by [method RegEx.search]
	and [method.RegEx.search_all]. It can be used to find the position and range of the match
	and its capturing groups, and it can extract its sub-string for you.
2017-11-18 01:41:32 +01:00
Rémi Verschelde 2e212a2cfd makerst: Remove stray spaces in method signatures 2017-10-21 14:01:05 +02:00
Rémi Verschelde 2cd044e89b makerst: Add support for [member] and [signal]
Part of #11137. [enum] is still missing, and none are implemented in the engine itself yet.
2017-10-21 13:53:59 +02:00
Rémi Verschelde b302084395 makerst: Fix rst-ization of members and escaping of [Class]s
Fixes #11517.
2017-10-21 12:33:52 +02:00
Rémi Verschelde f85d428b56 Merge pull request #12053 from Grosskopf/audiodocs-fix
filtering getters&setters over strings works for AudioStreamPlayer*
2017-10-19 16:17:41 +02:00
Grosskopf b4b632a37e filtering getters&setters over strings works for AudioStreamPlayer* 2017-10-15 09:28:29 +02:00
Rémi Verschelde deefc2a63d makerst: Fix support for module classes
Previous code expected only one XML per module, which is not the case for
e.g. mono or gdnative.
Also add newline after signal description to fix rst warning, and make the
script Python 3-compatible.

[ci skip]
2017-10-14 15:22:06 +02:00
mhilbrunner b772f5adc9 doc_status.py: Error message for unknown CLI flag, switch shebang to python 2017-10-07 14:57:04 +02:00
mhilbrunner 328b78a0b9 doc_status.py: Add -e (--empty) option to hide items with nothing left to do 2017-10-03 21:58:38 +02:00
Andreas Haas a4cfec4e21 Merge pull request #11757 from mhilbrunner/doc_status_py27
doc_status.py Python 2.7 backwards compatibility & Windows support
2017-10-02 22:24:38 +02:00
Poommetee Ketson 5005818798 Merge pull request #11654 from bojidar-bg/docstatus-fnmatch
Allow using wildcards to filter docstatus class names
2017-10-02 23:31:52 +07:00
mhilbrunner 2d46ee36cc doc_status.py Python 2.7 backwards compatibility 2017-10-01 21:47:54 +02:00
Bojidar Marinov 1f60d0c23f
Allow using wildcards to filter docstatus class names
[ci skip]
2017-09-28 13:13:32 +03:00
Alexander Meerhoff a11a9ddffc makerst.py: Support split classes XML and use folders and/or single files as input
The new syntax is (from `doc/`): `tools/makerst.py classes/ ../modules/`.
Also adapted `make rst` target accordingly.

[ci skip]
2017-09-23 10:34:35 +02:00
Bojidar Marinov ca72a4806f
Make doc_status output a bit more markdown-friendly, hide some prints 2017-09-16 13:47:44 +03:00
Daniel J. Ramirez e23454d5c3 Update doc status generator.
[ciskip]
2017-09-15 12:12:22 -05:00
Poommetee Ketson 5bbbecc315 Docs: ignore tags inside code,codeblock tag 2017-07-22 21:22:38 +07:00
Julian Murgia 9c7b4c82a7 Add Signals descriptions when they exist. 2017-06-14 15:48:50 +02:00
Rémi Verschelde 5d10b8fabd Doc: Drop unmainted converters for html, textile, dokuwiki 2017-05-06 23:43:02 +02:00
Rémi Verschelde 091b30d4cb Doc: Remove unused tool translation 2017-05-06 22:55:20 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde 4989cc3617 Fix URLs to moved docs pages
Closes #8266.
2017-04-05 07:34:27 +02:00
Bojidar Marinov 669956849a
Update classes.xml to master version, add a small feature to doc_status 2017-03-29 22:27:59 +03:00
Rémi Verschelde c7bc44d5ad Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
2017-01-01 22:03:33 +01:00
Rémi Verschelde f34151ff0f style: Various other PEP8 fixes in Python files
Done with `autopep8 --select=E7`, fixes:

- E701 - Put colon-separated compound statement on separate lines.
- E702 - Put semicolon-separated compound statement on separate lines.
- E703 - Put semicolon-separated compound statement on separate lines.
- E711 - Fix comparison with None.
- E712 - Fix (trivial case of) comparison with boolean.
- E713 - Fix (trivial case of) non-membership check.
- E721 - Fix various deprecated code (via lib2to3).
2016-11-01 00:35:16 +01:00
Rémi Verschelde 817dd7ccbb style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-01 00:35:16 +01:00
Rémi Verschelde d4c17700aa style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-01 00:35:16 +01:00
Rémi Verschelde 97c8508f5e style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-01 00:33:51 +01:00
Rémi Verschelde fc8ccd5b8c SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.
2016-10-17 20:10:46 +02:00