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.1.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.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: c3_godot_docs_gen-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 56b7f118e298549247245487af2a3680da7a61e281b4000656b6e0bb9c4a525f
MD5 8bb27761cca72dbd9422a3eade1ee468
BLAKE2b-256 b863a5abdb107cb4a0846bcb451c69c59ea707315c415c8841ba2ab37554b9f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: c3_godot_docs_gen-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b522a52e15aa8c424d1598e57f83089e0787a3d6d440fcf380d325f704cac5f
MD5 3cc643979289b8020c747ca054808a71
BLAKE2b-256 1c6bd5e96e2d59c4354b5d827191ef2f77dcf01545a2b75d4f7d8df63eb9c4b1

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