{"id":15992979,"url":"https://github.com/bash/broccolini","last_synced_at":"2025-03-17T19:32:04.289Z","repository":{"id":84753843,"uuid":"490023135","full_name":"bash/broccolini","owner":"bash","description":"A non-destructive parser for INI files compatible with `GetPrivateProfileString`","archived":false,"fork":false,"pushed_at":"2025-01-13T12:45:30.000Z","size":625,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-09T08:43:50.159Z","etag":null,"topics":["csharp","dotnet-standard","getprivateprofilestring","ini","ini-parser"],"latest_commit_sha":null,"homepage":"https://broccolini.tau.garden/","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/bash.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","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":"2022-05-08T18:23:29.000Z","updated_at":"2025-01-13T12:44:10.000Z","dependencies_parsed_at":"2023-12-11T22:58:01.016Z","dependency_job_id":"347a0d35-f16d-4d62-87cd-f5400e34ee91","html_url":"https://github.com/bash/broccolini","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash%2Fbroccolini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash%2Fbroccolini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash%2Fbroccolini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bash%2Fbroccolini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bash","download_url":"https://codeload.github.com/bash/broccolini/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878478,"owners_count":20362433,"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":["csharp","dotnet-standard","getprivateprofilestring","ini","ini-parser"],"created_at":"2024-10-08T06:42:11.671Z","updated_at":"2025-03-17T19:32:04.272Z","avatar_url":"https://github.com/bash.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Broccolini 🥦\n\n[![Build](https://github.com/bash/broccolini/workflows/Build/badge.svg)](https://github.com/bash/broccolini/actions?query=workflow%3ABuild)\n[![NuGet Version](https://img.shields.io/nuget/v/Broccolini)](https://www.nuget.org/packages/Broccolini)\n\nBroccolini is a non-destructive parser for INI files.\nThe main goal is compatibility with the INI format used in Windows OS ([`GetPrivateProfileString`] and friends).\n\n## Usage\n\n\u003cdetails\u003e\n\u003csummary\u003eINI file used in examples\u003c/summary\u003e\n\n```ini\n[database]\nserver = 192.0.2.62\nport = 1234\n```\n\n\u003c/details\u003e\n\n### Reading\n```cs\nvar document = IniParser.ParseToSemanticModel(File.ReadAllText(\"config.ini\"));\nstring databaseServer = document[\"database\"][\"server\"];\nstring databasePort = document[\"database\"][\"port\"];\n```\n\n### Editing\n```cs\nvar document = IniParser.Parse(File.ReadAllText(\"config.ini\"));\nvar updated = document\n    .WithSection(\"owner\", section =\u003e section.WithKeyValue(\"name\", \"John Doe\"))\n    .UpdateSection(\"database\", section =\u003e section.RemoveKeyValue(\"port\"));\nFile.WriteAllText(\"config.ini\", updated.ToString(), Encoding.Unicode);\n```\n\n## Stability\nThis library is feature-complete and stable.\nContributions are welcome, please create an issue first for discussion.\n\n## Known Differences\nWhile Broccolini tries to replicate most of the behaviour found in the Windows APIs,\nthere are still some intentional differences:\n\n* `GetPrivateProfileString` does not support keys or section names that contain NULL characters (`\\0`). \\\n   Broccolini supports such keys and section names.\n* While the editing API in Broccolini shares the goal of changing as little as possible, its behaviour\n  does not explicitly replicate the behaviour of `WritePrivateProfileString`.\n* `GetPrivateProfileString` breaks when a unicode file contains a non-trailing NULL character (`\\0`). \\\n   Broccolini supports such files.\n\n## Goals\n* Compatibiliy with INI format in Windows OS.\n* Roundtrips (`Parse` → `ToString`) should preserve everything.\n* Editing should preserve as much (whitespace, comments, etc.) as possible.\n* An extensive test suite.\n\n## Non-Goals\n* Deserialization into non-string types (complex objects, numbers, booleans, etc.)\n* Customizable parsing rules (e.g. different comment syntax)\n* Performance\n\n\n## License\nLicensed under the MIT license ([license-mit.txt](license-mit.txt) or \u003chttp://opensource.org/licenses/MIT\u003e).\n\n## Contribution\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the [Apache-2.0 license](http://www.apache.org/licenses/LICENSE-2.0), shall be\nlicensed as above, without any additional terms or conditions.\n\n[`GetPrivateProfileString`]: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getprivateprofilestring\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbash%2Fbroccolini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbash%2Fbroccolini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbash%2Fbroccolini/lists"}