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.

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 -o docs/api
  • path — directory containing the doctool-exported XML files.
  • -o, --output — output directory for generated Markdown (default docs/api).
  • --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.1.0.tar.gz (7.9 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.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: c3_godot_docs_gen-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 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.1.0.tar.gz
Algorithm Hash digest
SHA256 429991ebf88d1c40ce7d3ba24808d8fa1f0777fc09bbdf78ed2ca46e4db737ad
MD5 2d0a675b2729df6727d7a003bd76ee14
BLAKE2b-256 64cef3e0c2ed44d0174de67f7ffff6b716f0d20407f1536b9aa2b24b8bb1260d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: c3_godot_docs_gen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a44e17738708b482db22b843014e5add16ba4a073ead3909071b3ac54d5bc382
MD5 e62305e398fc14cddac0e3257919d7bd
BLAKE2b-256 15fb4caf6a03ca905b4c407bb077f49adc68ba92293e8b8aefa438168ab1e171

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