Skip to content

Commit

Permalink
misc: Follow more of AL's guidelines.
Browse files Browse the repository at this point in the history
  • Loading branch information
elenakrittik committed Sep 22, 2023
1 parent ac25cae commit fc01596
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 18 additions & 0 deletions addons/godot_xml/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
52 changes: 52 additions & 0 deletions addons/godot_xml/README.md
Original file line number Diff line number Diff line change
@@ -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*.

<details>
<summary>*Future plans</summary>

`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

</details>

## 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.
Empty file added assets/.gdignore
Empty file.
File renamed without changes
File renamed without changes

0 comments on commit fc01596

Please sign in to comment.