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

Adjust make_rst.py for GDScript documentation #98533

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

dalexeev
Copy link
Member

# Extract XML files.
godot --doctool --gdscript-docs path/to/project
# XML to RST.
doc/tools/make_rst.py --output docs-rst-folder docs-xml-folder
# RST to HTML.
make html

Test project: test-make-rst-for-rst.zip

@@ -2576,6 +2576,13 @@ def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_
f.write("\n")


def sanitize_class_name(dirty_name: str, is_file_name = False) -> str:
if is_file_name:
return dirty_name.lower().replace('"', "").replace("/", "--")
Copy link
Member Author

Choose a reason for hiding this comment

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

Borrowed from here:

String save_file = save_path.path_join(c.name.replace("\"", "").replace("/", "--") + ".xml");

Copy link
Member

@adamscott adamscott left a comment

Choose a reason for hiding this comment

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

Seems alright.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Needs rebase.

@dalexeev dalexeev force-pushed the adjust-make-rst-for-gds branch from e708ce6 to ba943e4 Compare November 30, 2024 08:48
@akien-mga akien-mga merged commit 702f567 into godotengine:master Dec 2, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@dalexeev dalexeev deleted the adjust-make-rst-for-gds branch December 2, 2024 15:00
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.

[Documentation Generation] make_rst.py fails to generate rst files for any gdscript generates xml files.
3 participants