https://github.com/hackx2/hxmini
Haxelib for parsing data in the (ini/toml/cfg) format.
https://github.com/hackx2/hxmini
haxe haxe-library haxelib hxini hxmini ini ini-parser toml toml-parser
Last synced: 4 months ago
JSON representation
Haxelib for parsing data in the (ini/toml/cfg) format.
- Host: GitHub
- URL: https://github.com/hackx2/hxmini
- Owner: hackx2
- License: mit
- Created: 2025-09-19T06:47:37.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2026-01-15T19:07:23.000Z (5 months ago)
- Last Synced: 2026-01-15T20:58:00.088Z (5 months ago)
- Topics: haxe, haxe-library, haxelib, hxini, hxmini, ini, ini-parser, toml, toml-parser
- Language: Haxe
- Homepage: https://lib.haxe.org/p/mini/
- Size: 455 KB
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README

Matter.ini 🌌 is a lightweight and simple library for parsing .ini data.
It offers an easy way to read, modify, and create your own .ini data.
Features :p
-
Comment Support: Ignores nodes starting with a semicolon(;) or an hashtag (#). -
Multi-line support: Allows you to define a node using triple quotation marks (""" """) -
File Creation & Editing: Lets you create and edit .ini files
Installation 🔧
You can install the library directly using haxelib.
haxelib install mini
Or you could install using git.
haxelib git mini https://github.com/hackx2/hxmini.git
Usage
Parse & Access .ini data
Here is a simple example of how to use the parser in your Haxe project.
First, let's assume you have a file named config.ini with the following contents:
```ini
[main.test]
name="hackx2"
meows="meow"
```
Now, you can parse this file and access its data:
```haxe
import mini.Parser;
// Get `testing.ini`'s file content.
final content : String = sys.io.File.getContent('testing.ini');
// Parse the content.
final ini:Ini = Parser.parse(content);
// Get the element.
final main:Ini = ini.elementsNamed("main.test").next();
// Get and print data.
Sys.println(main.get('name')); // Returns "hackx2"
Sys.println(main.get('meows')); // Returns "meow"
// -----------------------------
```
Create your own .ini files
Heres how you can create a .ini file:
```haxe
// Create the document.
final ini:Ini = Ini.createDocument();
// Create a Section
final user:Ini = Ini.createSection("User");
user.set("username", "Milo");
user.set("role", "Admin");
user.set("progress", "78%");
ini.addChild(user);
user.get('progress'); // Returns: "78%"
ini.toString(); // Returns the serialized .ini document
```
## Contribution (yippie)
Contributions are always welcome and appreciated!!! 💖If you have a bug or have any suggestions, please open an [issue](https://github.com/hackx2/hxmini/issues).
License
This project is licensed under the MIT License.