summaryrefslogtreecommitdiff
path: root/doc/tools/makerst.py
AgeCommit message (Collapse)Author
2021-02-15makerst: Add an option to filter which XML classes to outputAndrii Doroshenko (Xrayez)
Usage: ``` # Output `VisualScript` classes only (found in `modules/visual_script`) python doc/tools/makerst.py "doc/classes" "modules" --filter "visual_script" # Output CSG classes only (found in `modules/csg`) python doc/tools/makerst.py "doc/classes" "modules" --filter "csg" ```
2020-11-10doc: Fixups to #43419 which added operators in the docsRémi Verschelde
- Escape the method names as e.g. `operator <` is invalid XML. - Add a hack to merge all String % operator definitions for each Variant type as a single one with `Variant` argument type. - Add support for the new qualifiers in makerst.py. - Drop unused `doc_merge.py`, seems to date back to when we had all the documentation in a single `classes.xml`.
2020-09-15makerst: Add missing newline at EOFRémi Verschelde
2020-07-31Merge pull request #40613 from HaSa1002/multi-lang-docsRémi Verschelde
Add multiple programming language support to class reference
2020-07-30makerst: Add descriptions to method qualifiersHugo Locurcio
This closes https://github.com/godotengine/godot-docs/issues/1753.
2020-07-23Add multiple programming language support to class referenceHaSa1002
2020-05-27makerst: Print status messages to make the CI output clearerHugo Locurcio
This also removes an unused method.
2020-04-29Merge pull request #36960 from pycbouh/docs-improve-shortcutsRémi Verschelde
Improve shortcut formatting in docs
2020-04-24doc: Fix parsing typed arrays in makerst.pyRémi Verschelde
`Type[]` typed arrays will link to `Type`, as it's likely the most interesting information for the user. And sync classref with current source.
2020-04-10Improve shortcut formatting in docsYuri Sizov
2020-04-10Merge pull request #37426 from pycbouh/docs-override-propertiesRémi Verschelde
Add more verbosity for property overrides in RST documentation
2020-03-31Fixed errors in makerst pre-commit hookPouleyKetchoupp
2020-03-30Add more verbosity for property overrides in RST documentationYuri Sizov
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-01-26doc: Drop unused 'category' property from headerRémi Verschelde
We already removed it from the online docs with #35132. Currently it can only be "Built-In Types" (Variant types) or "Core" (everything else), which is of limited use. We might also want to consider dropping it from `ClassDB` altogether in Godot 4.0.
2020-01-24makerst: Escape reST markup after enumsRémi Verschelde
Fixes #35501.
2020-01-20makerst: Use code markup for default values/overridesRémi Verschelde
Fixes godotengine/godot-docs#3071.
2020-01-15doc: Move the class description to be just below the brief descriptionHugo Locurcio
- Drop the "Brief description" header as it became redundant with this change. - Fix a bug in the editor help where an extraneous newline was added after the header if the class isn't inherited by any others. - Remove the Category line in the rST markup as it's not useful for API users.
2019-12-04Travis CI: Run `makerst.py` to check for documentation errorsHugo Locurcio
2019-11-29makerst: Escape default values using reST markupRémi Verschelde
Otherwise the docs would complain about values like "godot_" which reST tries to interpret as an identifier.
2019-10-24makerst: Separate signals/enums/properties/methods with a lineHugo Locurcio
2019-10-01Print errors when tab indent found in [codeblock]Yeongho Kim
2019-09-04Add overriden properties to the documentationBojidar Marinov
Fixes #31855
2019-07-25Adds a meta on top of every generated class to hide 'Edit on Github' linkStraToN
Linked docs issue https://github.com/godotengine/godot-docs/pull/2656
2019-06-27Add default values to the editor help, docs, and generated RSTBojidar Marinov
Also, make spacing of "=" in the editor help a bit more consistent. Closes #16086
2019-06-11makerst: Fix format of [url] links in reSTRémi Verschelde
Moved some logic to make_url in an attempt to reuse it in the parser, but it proved too complex so I ended up not using it. I kept it as a separate method nevertheless.
2019-05-16Add support for [url=] tag to makerst.pyStanislav
Fixes #28904
2019-04-06Remove unused importsHendrikto
2019-03-29ClassRef: Replace [code]CurrentClass[/code] with [CurrentClass]Ignacio Etcheverry
Modified makerst to generate code tags for these to avoid hyperlinks to the same class.
2019-03-29EditorHelp, makerst: Improve enum ref resolving and constant ref supportIgnacio Etcheverry
Enum reference resolving will now search in the @GlobalScope if no class is specified and the enum cannot be resolved in the current class. Added support for constant references in EditorHelp, e.g.: [constant KEY_ENTER] or [constant Control.FOCUS_CLICK]. It supports enum constants (the enum name must not be included).
2019-03-10doc: Fix style for vararg in makerstRémi Verschelde
2019-03-05makerst: make vararg methods look the same as in editor helpmerumelu
2018-12-28makerst.py refactor.Pieter-Jan Briers
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-27Clean up & improve makerst.pyPieter-Jan Briers
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-11Enabled rst files to escape for parentheses after bracketsJoão Álvaro Ferreira
2018-10-27Dont use equality operators with None singleton in python fileslupoDharkael
2018-10-02Add extra newline after enum members and constants, to ensure they'll format ↵LikeLakers2
properly after a multi-line description
2018-09-21doc: Fixes to rst converterRémi Verschelde
2018-09-20Fix the weird method linking issue when the previous method's description ↵LikeLakers2
ends with a code block
2018-09-13doc: Make property sections in rst similar to editor docsRémi Verschelde
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-13Doc: Use PascalCase names in hyperlinksRémi Verschelde
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-12Doc: Use same headers and order in-editor and onlineRémi Verschelde
2018-06-12Add support for tutorial links to makerst.pyrobojumper
Also change the <tutorials> structure to make use of individual <link> tags
2018-05-31makerst.py: Properly escape \ for rstRémi Verschelde
Fixes godotengine/godot-docs#1486.
2018-05-12Makes doc methods display enums.Pieter-Jan Briers
2018-03-11Properly closing all files in Python codeViktor Ferenczi
2018-02-16Documentation tool does not add escapes to code and codeblocksAnish
Instead of adding the escapes to all * and _ the tool now excludes the characters inside [code] and [codeblock]. Resolves: #15156
2017-12-22Enums get listed in the docs and enum members now also link to theJoachim Meyer
corresponding enum in the webdocs Fixes #13254
2017-11-19Fix the class docs for the rst-syntax errors.Martin Capitanio
- 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-18Fix class docs, improve error handling of the rst generator.Martin Capitanio
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.