{"id":15048043,"url":"https://github.com/ssarcandy/ini-cpp","last_synced_at":"2025-07-30T08:07:08.722Z","repository":{"id":83110623,"uuid":"268064098","full_name":"SSARCandy/ini-cpp","owner":"SSARCandy","description":"📑 Yet another ini config parser for modern C++ ","archived":false,"fork":false,"pushed_at":"2024-12-15T19:17:00.000Z","size":310,"stargazers_count":42,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T01:11:38.999Z","etag":null,"topics":["cmake","configparser","cpp17","gtest","header-only","ini","ini-parser"],"latest_commit_sha":null,"homepage":"https://ssarcandy.tw/ini-cpp/index.html","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SSARCandy.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":"2020-05-30T11:15:02.000Z","updated_at":"2025-03-28T06:55:08.000Z","dependencies_parsed_at":"2024-12-15T20:20:53.358Z","dependency_job_id":"77ede428-ddab-4cad-834f-596f06189b33","html_url":"https://github.com/SSARCandy/ini-cpp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SSARCandy%2Fini-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SSARCandy%2Fini-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SSARCandy%2Fini-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SSARCandy%2Fini-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SSARCandy","download_url":"https://codeload.github.com/SSARCandy/ini-cpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137888,"owners_count":21053775,"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":["cmake","configparser","cpp17","gtest","header-only","ini","ini-parser"],"created_at":"2024-09-24T21:07:25.343Z","updated_at":"2025-04-10T01:11:42.611Z","avatar_url":"https://github.com/SSARCandy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C++ INI Parser\n\n[![C/C++ CI](https://github.com/SSARCandy/ini-cpp/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/SSARCandy/ini-cpp/actions/workflows/c-cpp.yml)\n[![codecov](https://codecov.io/gh/SSARCandy/ini-cpp/branch/master/graph/badge.svg)](https://codecov.io/gh/SSARCandy/ini-cpp)\n  \nYet another `.ini` parser for modern c++ (made for cpp17), inspired and extend from [inih](https://github.com/benhoyt/inih).\n\n\n## Example\n\nThe `config.ini`'s content is something looks like:\n\n```\n[section1]\nany=5\n\n[section2]\nany_vec = 1 2 3\n```\n\n```cpp\n#include \"ini/ini.h\"\n\nint main() {\n    inih::INIReader r{\"./test/fixtures/config.ini\"};\n\n    // Get and parse the ini value\n    const auto\u0026 v1 = r.Get\u003cstd::string\u003e(\"section1\", \"any\"); // \"5\"\n    const auto\u0026 v2 = r.Get\u003cint\u003e(\"section1\", \"any\"); // 5\n    const auto\u0026 v3 = r.Get\u003cdouble\u003e(\"section1\", \"any\"); // 5.0\n    const auto\u0026 v4 = r.GetVector\u003cfloat\u003e(\"section2\", \"any_vec\"); // [1.0, 2.0, 3.0]\n    const auto\u0026 v5 = r.GetVector\u003cstd::string\u003e(\"section2\", \"any_vec\"); // [\"1\", \"2\", \"3\"]\n\n    // And also support writing to new ini file.\n    r.InsertEntry(\"new_section\", \"key1\", 5); // Create new entry\n    inih::INIWriter::write(\"output.ini\", r); // Dump ini to file\n\n    return 0;\n}\n```\n\nTo learn more, please refer to [test folder](https://github.com/SSARCandy/ini-cpp/tree/master/test), it covered ALL utilities.\n\n## Install\n\nSimply copy the header file `ini/ini.h` to your project, then done. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssarcandy%2Fini-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssarcandy%2Fini-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssarcandy%2Fini-cpp/lists"}