Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

generate docs#130

Merged
FreddyMSchubert merged 3 commits intodevfrom
generate-docs
Aug 11, 2025
Merged

generate docs#130
FreddyMSchubert merged 3 commits intodevfrom
generate-docs

Conversation

@flomero
Copy link
Contributor

@flomero flomero commented Jul 27, 2025

yes the python file is vibe coded

@flomero flomero requested review from PaulicStudios and Copilot July 27, 2025 15:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive documentation generation capabilities to the project. It creates a Python script to parse Doxygen XML output and convert it to Markdown format, along with shell scripts to automate the documentation generation process.

  • Added a Python script to convert Doxygen XML to Markdown documentation
  • Created a shell script to automate the complete documentation generation workflow
  • Enhanced header file documentation with additional Doxygen comments for structs
  • Generated markdown documentation file with API reference

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
inc/core_lib.h Added Doxygen comments for position, object, and config structures
docs/generate_md_docs.py Python script that parses Doxygen XML and generates markdown documentation
docs/generate_docs.sh Shell script to automate doxygen and markdown generation process
docs/docs.md Generated markdown documentation file containing API reference
docs/README.md Simple documentation README with usage instructions
Comments suppressed due to low confidence (1)

docs/generate_md_docs.py:49

  • [nitpick] The output filename 'docs.md' is hardcoded, making the script less flexible. Consider making this configurable through command line arguments or configuration.
            brief = ""

"""Parse enum documentation from XML file."""
try:
tree = ET.parse(xml_file)
root = tree.getroot()
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

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

The XML parsing error handling only catches ET.ParseError but not other potential exceptions like FileNotFoundError or PermissionError that could occur during file operations.

Copilot uses AI. Check for mistakes.
Comment on lines +290 to +294
with open(output_file, "w", encoding="utf-8") as f:
f.write("# Connection Library API Documentation\n\n")
f.write(
"This document provides documentation for the public API of the Connection Library.\n\n"
)
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

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

File operations should include proper error handling for cases where the output file cannot be created or written to due to permissions or disk space issues.

Suggested change
with open(output_file, "w", encoding="utf-8") as f:
f.write("# Connection Library API Documentation\n\n")
f.write(
"This document provides documentation for the public API of the Connection Library.\n\n"
)
try:
with open(output_file, "w", encoding="utf-8") as f:
f.write("# Connection Library API Documentation\n\n")
f.write(
"This document provides documentation for the public API of the Connection Library.\n\n"
)
except OSError as e:
print(f"Error: Unable to write to file '{output_file}': {e}")
sys.exit(1)

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@PaulicStudios
Copy link
Member

That is already pretty cool. Other Examples and more explanation can be added just elsewhere in other markdown files!

@FreddyMSchubert
Copy link
Member

Super gut danke dir! Zwei Sachen:

Screenshot 2025-07-27 at 18 02 11
  • Kriegen wir da bitte irgendwie ein Leerzeichen dazwischen?

  • Stimmt was Paul meint mit man kann da einfach noch Markdown files dazulegen? Wenn ja würd ich bisschen Tutorial schreiben. Wie müsste das File heißen, wo muss das liegen? Oder können wir einfach alle md files in dem inc/ folder auf der Webseite displayen?

@PaulicStudios
Copy link
Member

Super gut danke dir! Zwei Sachen:
Screenshot 2025-07-27 at 18 02 11

* Kriegen wir da bitte irgendwie ein Leerzeichen dazwischen?

* Stimmt was Paul meint mit man kann da einfach noch Markdown files dazulegen? Wenn ja würd ich bisschen Tutorial schreiben. Wie müsste das File heißen, wo muss das liegen? Oder können wir einfach alle md files in dem inc/ folder auf der Webseite displayen?

Ich hätte den Wiki in zwei Teil unterteilt. Das wäre dann der wie im letzen wo einfach jede Funktion der Library ist und wie beim alten dann einfach wo anders. An dem wo anders müssen wir noch arbeiten wie wir das machen. Probiere jetzt gleich nochmal mit Copilot in die jetzige Webseite Markdown rendering zu integrieren...

@FreddyMSchubert FreddyMSchubert marked this pull request as ready for review August 11, 2025 11:59
@FreddyMSchubert FreddyMSchubert merged commit 69a4e31 into dev Aug 11, 2025
4 checks passed
@FreddyMSchubert FreddyMSchubert deleted the generate-docs branch August 11, 2025 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants