{"id":18048419,"url":"https://github.com/you-win/gdml","last_synced_at":"2026-03-02T10:31:10.154Z","repository":{"id":41992404,"uuid":"467639827","full_name":"you-win/gdml","owner":"you-win","description":"Godot Markup Language","archived":false,"fork":false,"pushed_at":"2022-04-20T03:28:02.000Z","size":921,"stargazers_count":31,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"senpai","last_synced_at":"2025-04-10T09:59:24.137Z","etag":null,"topics":["godot","gui","markup-language"],"latest_commit_sha":null,"homepage":"","language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/you-win.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-08T18:59:40.000Z","updated_at":"2025-03-28T06:35:04.000Z","dependencies_parsed_at":"2022-08-12T01:40:44.752Z","dependency_job_id":null,"html_url":"https://github.com/you-win/gdml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/you-win/gdml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fgdml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fgdml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fgdml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fgdml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/you-win","download_url":"https://codeload.github.com/you-win/gdml/tar.gz/refs/heads/senpai","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fgdml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29998512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["godot","gui","markup-language"],"created_at":"2024-10-30T20:12:39.247Z","updated_at":"2026-03-02T10:31:10.096Z","avatar_url":"https://github.com/you-win.png","language":"GDScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GDML (Godot Markup Language)\n\n[![Chat on Discord](https://img.shields.io/discord/853476898071117865?label=chat\u0026logo=discord)](https://discord.gg/6mcdWWBkrr)\n\nAn HTML-inspired markup language for Godot UIs.\n\nGDML parses an `xml` file and generates a corresponding tree of Godot `Node`s to be added to the `SceneTree`. Anonymous, inline scripts are allowed along with loading scripts from a context path.\n\n## Quickstart\n\n1. Copy the `./addons/gdml/` directory to your project's `addons` directory\n2. Load `.addons/gdml/gdml.gd` and instance it. A context path (the directory containing the `xml` files + resources) must be provided\n3. Call the `generate` method. A file name must be provided relative to the context path\n   1. e.g. `var my_output: Control = gdml.generate(\"my_file.xml\")`\n4. Add the output to the `SceneTree`\n\n## Example\n\n### my_gdml_file.xml\n\n1. Create a `CanvasLayer` on layer -1 and a black `ColorRect` to act as the background.\n2. Creates a `gdml` container node that holds an anonymous script.\n3. A `VBoxContainer` is created inside the `gdml` node that contains a `Label` and a `Button`.\n4. The `Button` is hooked up to the anonymous script to print \"hello\" when the element is pressed.\n\n```xml\n\n\u003ccanvas_layer gdml_props=\"layer: -1\"\u003e\n    \u003ccolor_rect gdml_name=\"Background\" gdml_style=\"anchor: full_rect; color: (colorN) Black\"/\u003e\n\u003c/canvas_layer\u003e\n\n\u003cgdml gdml_style=\"anchor: full_rect; margin_top: 10; margin_left: 10\"\u003e\n    \u003cgdml_script\u003e\n        func say_hello():\n            print(\"hello\")\n    \u003c/gdml_script\u003e\n\n    \u003cv_box_container gdml_style=\"anchor: full_rect\"\u003e\n        \u003clabel\u003eHello label!\u003c/label\u003e\n        \u003cbutton pressed=\"say_hello\"\u003eclick me\u003c/button\u003e\n    \u003c/v_box_container\u003e\n\u003c/gdml\u003e\n\n```\n\n### my_scene.gd\n\n1. Load in `gdml.gd` and create a new instance. A path to the directory containing valid `gdml` `xml` files should be provided\n2. `gdml.generate(...)` is called, specifying the main entrypoint for the output\n3. The output is added as a child\n\n```GDScript\nextends Node\n\nfunc _ready():\n   var gdml = load(\"path_to_gdml_gd\").new(\"path_to_folder_containing_my_gdml_file\")\n   \n   var gui = gdml.generate(\"my_gdml_file.xml\")\n   add_child(gui)\n\n```\n\n## Design Decisions\n* GDML-specific properties are prepended with `gdml_` in order to namespace them\n* There is an implicit, global `gdml` node that wraps each `xml` file\n  * This is needed since scripts can be placed at the root level\n* `gdml_props` is an alias of `gdml_style` as they work in the same way (aka styles for Godot `Control`s are just properties)\n* Context paths are used instead of `res://` paths, as the library is meant to be used for runtime loaded UIs. Because of this, context paths will generally point outside of the project\n\n## 3rd Party Libraries\n* [godot-css-theme](https://github.com/kuma-gee/godot-css-theme)\n  * Modified to namespace the classes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyou-win%2Fgdml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyou-win%2Fgdml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyou-win%2Fgdml/lists"}