Skip to content
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

Add and expose a method for getting a list of script documentation in the Script class #62928

Merged
merged 0 commits into from
Aug 17, 2022

Conversation

Xwdit
Copy link
Contributor

@Xwdit Xwdit commented Jul 12, 2022

Part modified from #39849 by @ThakeeNathees

This allows users to access script documentation through scripts when tools=yes, making it easy to export script documentation to xml/json/bbcode/markdown etc, or create any tool based on it.

Partial implementation godotengine/godot-proposals#177

This should allow more freedom than exporting several preset document formats through the editor UI, allowing community to easily create various addons to export documents in different formats.

@YuriSizov
Copy link
Contributor

The CI fails because you have edited the documentation files by hand. Please run the doctool instead.

@Xwdit
Copy link
Contributor Author

Xwdit commented Jul 12, 2022

The CI fails because you have edited the documentation files by hand. Please run the doctool instead.

Thanks for the reminder, I have fixed this

Comment on lines 48 to 49
<description>
</description>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to add documentation for this... documentation method.

Array doc_dicts;
for (int idx = 0; idx < classes.size(); idx++) {
DocData::ClassDoc p_class = classes[idx];
Dictionary json;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should call this variable json, so we don't confuse future contributors. This API is agnostic.

@YuriSizov
Copy link
Contributor

Needs a rebase. And addressing the review notes from Akien and myself.

I haven't tested it, but it looks straight-forward. Would be nice to have some tests/examples of its usage.

@Xwdit
Copy link
Contributor Author

Xwdit commented Aug 17, 2022

Oops, looks like I messed up something, I will reopen a PR to address this

@Xwdit Xwdit deleted the script_doc branch August 17, 2022 14:37
@YuriSizov
Copy link
Contributor

YuriSizov commented Aug 17, 2022

For the record: this is NOT merged, the PR was just changed to include no commits, so GitHub decided to mark it as merged for whatever reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants