Skip to main content

Converts Godot doctool XML class references into Markdown documentation.

Project description

c3-godot-docs-gen

Converts Godot's --doctool XML class-reference output into Markdown documentation (GitHub-Flavored Markdown), for GDScript-only projects.

Installation

pip install c3-godot-docs-gen

Usage

1. Export class-reference XML from your Godot project:

godot --doctool path/to/xml_output --gdscript-docs res://path/to/your/scripts

This produces one .xml file per class (e.g. MyClass.xml).

2. Generate Markdown documentation:

c3-godot-docs-gen path/to/xml_output docs/api
  • path — directory containing the doctool-exported XML files.
  • output — output directory for generated Markdown.
  • --dry-run — print the filenames that would be generated without writing them.

This writes one ClassName.md file per public class, plus an index.md listing all public classes.

Development

Set up the dev environment:

poetry install

Run the test suite:

pytest

The implementation is split into independently-testable layers:

Module Responsibility
model.py Dataclasses for the parsed class model (ClassDef, MethodDef, PropertyDef, SignalDef, ConstantDef, EnumDef).
parse.py Parses doctool XML into the model and builds the class registry.
resolve.py Resolves class/member/enum/constant references into Markdown links and anchors.
bbcode.py Converts Godot's BBCode-like markup in descriptions into Markdown.
render.py Renders a parsed class into a Markdown page.
cli.py Command-line entry point; orchestrates parsing, rendering, and file output.

Tests live under tests/, with one test file per module and shared XML fixtures in tests/fixtures/xml/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c3_godot_docs_gen-0.3.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

c3_godot_docs_gen-0.3.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file c3_godot_docs_gen-0.3.0.tar.gz.

File metadata

  • Download URL: c3_godot_docs_gen-0.3.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.0 Windows/11

File hashes

Hashes for c3_godot_docs_gen-0.3.0.tar.gz
Algorithm Hash digest
SHA256 03d7b4c25714c92d1e6e71b86e05f0ea6925959c6e7958fe5afb4522d2c2dc44
MD5 0db932ee92f902f1e6d0d98471ff605c
BLAKE2b-256 a83f7ba4be3600371f963cc98ab1c022b78431fbf7f5879961dc5fdd1771ab48

See more details on using hashes here.

File details

Details for the file c3_godot_docs_gen-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: c3_godot_docs_gen-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.0 Windows/11

File hashes

Hashes for c3_godot_docs_gen-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5c0f97cfeb3564be73998033db478442a9d5bf90658a463664acff0424f1d8c
MD5 962bbe41e0b176ea7964c6b9c70e40b3
BLAKE2b-256 08c92350957f788737c9576c0dba85944d68927245e4a98ede07a22bff442b5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page