{"id":21133380,"url":"https://github.com/kris701/initoolssharp","last_synced_at":"2025-03-14T12:29:20.556Z","repository":{"id":230081379,"uuid":"778424159","full_name":"kris701/IniToolsSharp","owner":"kris701","description":"Some simple tools to work with INI files","archived":false,"fork":false,"pushed_at":"2024-03-28T07:10:23.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T06:26:07.017Z","etag":null,"topics":["ini","parser"],"latest_commit_sha":null,"homepage":"","language":"C#","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/kris701.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2024-03-27T17:40:23.000Z","updated_at":"2024-03-27T18:34:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac5fd263-7c18-4c81-ae9e-b4e41ec1b872","html_url":"https://github.com/kris701/IniToolsSharp","commit_stats":null,"previous_names":["kris701/initoolssharp"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris701%2FIniToolsSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris701%2FIniToolsSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris701%2FIniToolsSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kris701%2FIniToolsSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kris701","download_url":"https://codeload.github.com/kris701/IniToolsSharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243576915,"owners_count":20313518,"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":["ini","parser"],"created_at":"2024-11-20T06:08:12.594Z","updated_at":"2025-03-14T12:29:20.534Z","avatar_url":"https://github.com/kris701.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/kris701/IniToolsSharp/assets/22596587/058e2a34-1864-46e9-868c-cc94d6ae11d7\" width=\"200\" height=\"200\" /\u003e\n\u003c/p\u003e\n\n[![Build and Publish](https://github.com/kris701/IniToolsSharp/actions/workflows/dotnet-desktop.yml/badge.svg)](https://github.com/kris701/IniToolsSharp/actions/workflows/dotnet-desktop.yml)\n![Nuget](https://img.shields.io/nuget/v/IniToolsSharp)\n![Nuget](https://img.shields.io/nuget/dt/IniToolsSharp)\n![GitHub last commit (branch)](https://img.shields.io/github/last-commit/kris701/IniToolsSharp/main)\n![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/kris701/IniToolsSharp)\n![Static Badge](https://img.shields.io/badge/Platform-Windows-blue)\n![Static Badge](https://img.shields.io/badge/Platform-Linux-blue)\n![Static Badge](https://img.shields.io/badge/Framework-dotnet--8.0-green)\n\nINI Tools Sharp is a little project to manipulate and output INI files.\nYou can find it on the [NuGet Package Manager](https://www.nuget.org/packages/IniToolsSharp/) or the [GitHub Package Manager](https://github.com/kris701/IniToolsSharp/pkgs/nuget/IniToolsSharp).\n\n# How to Use\nThe package is inspired by that of [System.Text.Json](https://www.nuget.org/packages/System.Text.Json/9.0.0-preview.2.24128.5), where you can access two primary static methods, `INISerialiser.Deserialise` and `INISerialiser.Serialise` to convert generic classes into INI format and back.\nA class represents a section by giving it a `IniSectionAttribute` and a name.\n\n## Example\nTest class to work with:\n```csharp\npublic class Section1\n{\n    public bool Value1 { get; set; } = false;\n    public int Value2 { get; set; } = -1;\n}\npublic class SomeSettings\n{\n    [IniSection(\"SectionName\")]\n    public Section1 Section { get; set; } = new Section1();\n}\n```\nYou can then serialise it into a INI file format:\n```csharp\nvar text = IniSerialiser.Serialise(new SomeSettings());\n```\nThis will output text as follows:\n```ini\n[SectionName]\nValue1=False\nValue2=-1\n```\nThe same text can be deserialised back into the `SomeSettings` object.\n\n## Example\nYou can also use simple list types as follows:\n```csharp\npublic class Section1\n{\n    public List\u003cint\u003e Values { get; set; } = new List\u003cint\u003e()\n    {\n        5,\n        123,\n        -1\n    }\n}\npublic class SomeSettings\n{\n    [IniSection(\"SectionName\")]\n    public Section1 Section { get; set; } = new Section1();\n}\n```\nYou can then serialise it into a INI file format:\n```csharp\nvar text = IniSerialiser.Serialise(new SomeSettings());\n```\nThis will output text as follows:\n```ini\n[SectionName]\nValues=[5,123,-1]\n```\nThe same text can be deserialised back into the `SomeSettings` object.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkris701%2Finitoolssharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkris701%2Finitoolssharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkris701%2Finitoolssharp/lists"}