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.2.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.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: c3_godot_docs_gen-0.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 9e89fa7159d0e785ed44270ce93ece0a6671dde9d186e393d12a6feab3157d11
MD5 a4c91e6096ae96b7b7bd9e33effc42bd
BLAKE2b-256 23801867bbd8cb090f60c0beca2430f99f28a883d9a26bbb399b62f6150ef95b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: c3_godot_docs_gen-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70eba2983d97938f8e89f4b0667ae9f194cefbb438b7c2cb707b3f710e6b4e99
MD5 8f7dcc7b7ce33c7ee4d9df5256ca4ca7
BLAKE2b-256 00883b3138bf78431c8dbf6bf9e717ea3e9cb7ea8f4cd15c6e00dfe32ec45053

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