{"id":13316520,"url":"https://github.com/TheRandomLabs/AutoConfig-TOML","last_synced_at":"2025-03-10T23:32:07.035Z","repository":{"id":95451185,"uuid":"321902785","full_name":"TheRandomLabs/AutoConfig-TOML","owner":"TheRandomLabs","description":"A custom TOML ConfigSerializer for AutoConfig that uses NightConfig.","archived":false,"fork":false,"pushed_at":"2021-01-23T04:19:09.000Z","size":287,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"autoconfig-3.x.x-fabric","last_synced_at":"2025-03-02T12:33:45.402Z","etag":null,"topics":["configuration","fabric","forge","minecraft","minecraft-fabric","minecraft-forge"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheRandomLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"therandomlabs"}},"created_at":"2020-12-16T07:26:26.000Z","updated_at":"2021-01-23T04:19:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"51017264-41e8-4ddb-8ef7-6f034ce88e3f","html_url":"https://github.com/TheRandomLabs/AutoConfig-TOML","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheRandomLabs%2FAutoConfig-TOML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheRandomLabs%2FAutoConfig-TOML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheRandomLabs%2FAutoConfig-TOML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheRandomLabs%2FAutoConfig-TOML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheRandomLabs","download_url":"https://codeload.github.com/TheRandomLabs/AutoConfig-TOML/tar.gz/refs/heads/autoconfig-3.x.x-fabric","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242945098,"owners_count":20210752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["configuration","fabric","forge","minecraft","minecraft-fabric","minecraft-forge"],"created_at":"2024-07-29T18:21:47.427Z","updated_at":"2025-03-10T23:32:07.010Z","avatar_url":"https://github.com/TheRandomLabs.png","language":"Java","readme":"# AutoConfig-TOML\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n![Build](https://github.com/TheRandomLabs/AutoConfig-TOML/workflows/Build/badge.svg?branch=autoconfig-3.x.x-fabric)\n[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/TheRandomLabs/AutoConfig-TOML.svg)](http://isitmaintained.com/project/TheRandomLabs/AutoConfig-TOML \"Average time to resolve an issue\")\n\nA custom TOML [ConfigSerializer](https://github.com/shedaniel/AutoConfig/blob/1.16/src/main/java/me/sargunvohra/mcmods/autoconfig1u/serializer/ConfigSerializer.java)\nfor [AutoConfig](https://github.com/shedaniel/AutoConfig/tree/1.16) that uses\n[NightConfig](https://github.com/TheElectronWill/night-config).\n\nAutoConfig-TOML does **not** require Fabric API!\n\n## Sponsor\n\nI've partnered with Apex Hosting! In my experience, their servers are lag-free, easy to manage,\nand of high quality. Check them out here:\n\n\u003ca href=\"https://billing.apexminecrafthosting.com/aff.php?aff=3907\"\u003e\n\t\u003cimg src=\"https://cdn.apexminecrafthosting.com/img/theme/apex-hosting-mobile.png\" width=\"594\" height=\"100\" border=\"0\"\u003e\n\u003c/a\u003e\n\n## Aims\n\nAutoConfig-TOML aims to provide a `ConfigSerializer` for TOML that is slightly better than\n[Toml4jConfigSerializer](https://github.com/shedaniel/AutoConfig/blob/1.16/src/main/java/me/sargunvohra/mcmods/autoconfig1u/serializer/Toml4jConfigSerializer.java),\nthe TOML `ConfigSerializer` that comes with AutoConfig.\n\n## Features\n\n### Better validation\n\n* `ConfigData#validatePostLoad()` is always called and any updated values are written to disk on\nboth serialization and deserialization.\n* As a result, it can be ensured that valid values are always present both in the configuration\nwritten to disk and in the configuration object.\n* Additionally, `ConfigData#validatePostLoad()` is also called on categories, and not just the main\nconfiguration object.\n* In addition, NightConfig's [Spec*](https://github.com/TheElectronWill/night-config/tree/master/core/src/main/java/com/electronwill/nightconfig/core/conversion)\nannotations are supported, and invalid values are automatically reset to the defaults.\n\n### Property keys\n\n* Property field names are automatically converted to lower_snake_case TOML keys.\n* [Path](https://github.com/TheElectronWill/night-config/blob/master/core/src/main/java/com/electronwill/nightconfig/core/conversion/Path.java)\nannotations may be utilised to manually specify TOML property keys, which are not subject to this conversion.\n\n### Configuration paths\n\n* A `Path` annotation may also be used to specify the path of a configuration file relative to the\nconfiguration directory.\n\n### Comments\n\n* Comments for properties, categories and configuration files may be specified through the use of\n`TOMLConfigSerializer.Comment`.\n* Default, minimum and maximum values are automatically appended to the comments.\n\n### Utility methods\n\nIf a reference to the `TOMLConfigSerializer` is stored, the following utility methods are\navailable:\n\n* `TOMLConfigSerializer#getConfig()` returns the configuration object.\n* `TOMLConfigSerializer#reloadFromDisk()` reloads the configuration from disk.\n\n## Usage\n\n`TOMLConfigSerializer` can be used just like any other `ConfigSerializer` for AutoConfig.\nExample usage can be found in the [test mod](https://github.com/TheRandomLabs/AutoConfig-TOML/tree/autoconfig-3.x.x-fabric/src/testmod).\n\n### Using with Gradle\n\n```groovy\nrepositories {\n\t//...\n\n\tmaven {\n\t\turl \"https://dl.bintray.com/shedaniel/cloth-config-2\"\n\t}\n\n\tmaven {\n\t\turl \"https://dl.bintray.com/shedaniel/autoconfig1u\"\n\t}\n\n\tmaven {\n\t\turl \"https://jitpack.io\"\n\t}\n}\n\ndependencies {\n\t//...\n\n\tmodImplementation(\"me.shedaniel.cloth:config-2:${project.clothConfigVersion}\") {\n\t\texclude(module: \"fabric-api\")\n\t}\n\tinclude \"me.shedaniel.cloth:config-2:${project.clothConfigVersion}\"\n\n\tmodImplementation(\"me.sargunvohra.mcmods:autoconfig1u:${project.autoConfigVersion}\") {\n\t\texclude(module: \"fabric-api\")\n\t}\n\n\tinclude \"me.sargunvohra.mcmods:autoconfig1u:${project.autoConfigVersion}\"\n\n\tmodImplementation \"com.github.TheRandomLabs:AutoConfig-TOML:autoconfig-3.x.x-fabric-SNAPSHOT\"\n\tinclude \"com.github.TheRandomLabs.AutoConfig-TOML:autoconfig-3.x.x-fabric-SNAPSHOT\"\n}\n```\n\n### Why not just write another configuration library?\n\n* AutoConfig lets me easily create a configuration GUI on both Fabric and Forge.\n* I'm not sure the world needs yet another configuration library.\n* This way, I don't have to maintain my own configuration library.\n","funding_links":["https://patreon.com/therandomlabs"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheRandomLabs%2FAutoConfig-TOML","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheRandomLabs%2FAutoConfig-TOML","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheRandomLabs%2FAutoConfig-TOML/lists"}