-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dump API docs from inline GDScript comments using --doctool --gdscript-docs PATH #76490
Conversation
The feature makes sense to me. Cc @NathanLovato for the GDquest team, if that looks good to you as your team is working on documentation tooling. |
It does look good, though note that our tool was mostly to fill the gap for Godot 3, as having docs generated in the editor was the biggest need for us. |
f40a332
to
734d23b
Compare
734d23b
to
a64137d
Compare
Didn't review in depth, but some comments:
|
Thanks for the review!!
That said, if you'd prefer that we didn't use
Yeah, I'm not crazy about adding more junk to It'd be great to extract it, but we'd still need a way to affect how CLI arguments are parsed depending on if GDScript is enabled (since we wouldn't want to offer a Anyway, I was hoping this could sneak in for now given that it's not too much code. :-) But let me know if this is blocker, and then I'll try to think up some options. |
I didn't notice that you actually needed two paths for this. Makes sense to use
No it's ok to proceed with the hack for now. A better system IMO depends on refactoring the whole of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and very useful feature.
I've seen it in use at W4 to create online docs for a Godot Addon. Having the same docs XML > Sphinx > ReadTheDocs workflow we already do but for Godot GDScript addons is potentially very cool.
I really want to see this integrated with a new version of the Asset Lib so people can get a online reference built for their addons automatically (optionally of course).
Thanks! |
Godot is now parsing inline API documentation in GDScript, in order to show it in the editor's integrated help system.
This PR allows dumping this as XML by passing
--doctool --gdscript-docs PATH
on the command-line, using the same XML format as--doctool
normally does for the engine API documentation.This could allow addon authors to further process the XML, for example, to create an online API reference.
I'm not 100% sure that having this in the engine is a good idea. It wouldn't be that hard to create an external tool that parsed GDScript's inline API documentation (like https://github.com/GDQuest/gdscript-docs-maker). The advantage to having it in engine is that it will exactly match what shows up in the editor's help system.
What do you think?