diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8c71697 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +# Normalize line endings for all files that Git considers text files. +* text=auto eol=lf + +# Only include the addons folder when downloading from the Asset Library. +/** export-ignore +/addons !export-ignore +/addons/** !export-ignore diff --git a/.gitignore b/.gitignore index ab59144..ac412a3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,5 @@ main.tscn library.xml # Keep the addon icon -!addons/godot_xml/icon.svg -!addons/godot_xml/icon.png +!assets/icon.svg +!assets/icon.png diff --git a/addons/godot_xml/LICENSE b/addons/godot_xml/LICENSE new file mode 100644 index 0000000..174aceb --- /dev/null +++ b/addons/godot_xml/LICENSE @@ -0,0 +1,18 @@ +Copyright 2023-present elenakrittik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/addons/godot_xml/README.md b/addons/godot_xml/README.md new file mode 100644 index 0000000..af9d7b0 --- /dev/null +++ b/addons/godot_xml/README.md @@ -0,0 +1,52 @@ +# GodotXML - advanced XML support for Godot 4. + +This addon adds support for manipulating XML data in Godot 4 with ease. + +> Supports Godot 4.0, 4.1 and the likely the upcoming 4.2. + +> HINT: Migrating from v1? See [changelog](./CHANGELOG.md) for a complete list of breaking (and not) changes. + +## Features + +- Pure-Godot - everything is done using built-in `XMLParser` and does not rely on external bindings*; +- Loading and dumping XML data into/from a convenient class-based format; +- Beautifying XML; +- Converting XML into dictionaries; +- Access uniquely named children of nodes as if they were regular attributes (works in the editor too!); +- Decent error messages for when the input is malformed*. + +
+ *Future plans + + `XMLParser`, Godot's native, low-level XML parser that this addon works on top of, or, more specifically, + `irrXML` (on which `XMLParser` is based), always assumes input to be trusted and valid, and therefore lacks both + adequate error handling and adequate security measures. In case of error handling addon currently + implements a few workarounds that eliminate *known* godot bugs, but still cannot handle syntactically invalid + input; in case of security we can't do anything unfortunately. Due to the above and our intention for this + plugin to be usable in as much cases as possible, this addon will soon migrate to a custom, more modern XML + library like Expat. + + Related issues on Godot's tracker: + - https://github.com/godotengine/godot/issues/72517 + - https://github.com/godotengine/godot/issues/51380 + - https://github.com/godotengine/godot/issues/81896 + - https://github.com/godotengine/godot/issues/51622 + - https://github.com/godotengine/godot/issues/81896#issuecomment-1731320027 + +
+ +## Installation + +Search for the "GodotXML" addon on the asset library ([link](https://godotengine.org/asset-library/asset/1684)) or alternatively copy the `addons/` folder into your project's root. + +## API + +All functions and attributes that are meant for use by you do not have `_` before their name +and are also listed before any internal function. + +All other functions and attributes are **not meant** to be used by you, though of course +you can edit them as you like. + +## Roadmap + +- [ ] Setup automated tests. diff --git a/assets/.gdignore b/assets/.gdignore new file mode 100644 index 0000000..e69de29 diff --git a/addons/godot_xml/icon.png b/assets/icon.png similarity index 100% rename from addons/godot_xml/icon.png rename to assets/icon.png diff --git a/addons/godot_xml/icon.svg b/assets/icon.svg similarity index 100% rename from addons/godot_xml/icon.svg rename to assets/icon.svg