{"id":19949490,"url":"https://github.com/jtilly/inih","last_synced_at":"2025-04-09T05:09:19.550Z","repository":{"id":14392208,"uuid":"49899076","full_name":"jtilly/inih","owner":"jtilly","description":"This is a header only C++ version of inih.","archived":false,"fork":false,"pushed_at":"2024-09-18T13:41:38.000Z","size":74,"stargazers_count":445,"open_issues_count":0,"forks_count":95,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-02T04:02:10.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/benhoyt/inih","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/jtilly.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":"2016-01-18T19:16:20.000Z","updated_at":"2025-03-27T13:16:58.000Z","dependencies_parsed_at":"2024-11-30T17:11:46.767Z","dependency_job_id":"d1f93dac-ac0f-4a9b-81c9-4629905f1894","html_url":"https://github.com/jtilly/inih","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/jtilly%2Finih","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtilly%2Finih/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtilly%2Finih/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtilly%2Finih/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jtilly","download_url":"https://codeload.github.com/jtilly/inih/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980837,"owners_count":21027808,"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":[],"created_at":"2024-11-13T00:45:24.672Z","updated_at":"2025-04-09T05:09:19.519Z","avatar_url":"https://github.com/jtilly.png","language":"C++","readme":"# inih\n\n[![CI](https://github.com/jtilly/inih/actions/workflows/ci.yml/badge.svg)](https://github.com/jtilly/inih/actions/workflows/ci.yml)\n\nThis is a header only C++ version of [inih](https://github.com/benhoyt/inih).\n\n**inih (INI Not Invented Here)** is a simple [.INI file](http://en.wikipedia.org/wiki/INI_file) parser written in C. It's only a couple of pages of code, and it was designed to be _small and simple_, so it's good for embedded systems. It's also more or less compatible with Python's [ConfigParser](http://docs.python.org/library/configparser.html) style of .INI files, including RFC 822-style multi-line syntax and `name: value` entries.\n\n## Usage\n\nAll you need to do is to include `INIReader.h`. Consider the following example (`INIReaderTest.cpp`):\n\n```cpp\n#include \u003ciostream\u003e\n#include \"INIReader.h\"\n\nint main() {\n\n    INIReader reader(\"test.ini\");\n\n    if (reader.ParseError() != 0) {\n        std::cout \u003c\u003c \"Can't load 'test.ini'\\n\";\n        return 1;\n    }\n    std::cout \u003c\u003c \"Config loaded from 'test.ini': version=\"\n              \u003c\u003c reader.GetInteger(\"protocol\", \"version\", -1) \u003c\u003c \", name=\"\n              \u003c\u003c reader.Get(\"user\", \"name\", \"UNKNOWN\") \u003c\u003c \", email=\"\n              \u003c\u003c reader.Get(\"user\", \"email\", \"UNKNOWN\") \u003c\u003c \", pi=\"\n              \u003c\u003c reader.GetReal(\"user\", \"pi\", -1) \u003c\u003c \", active=\"\n              \u003c\u003c reader.GetBoolean(\"user\", \"active\", true) \u003c\u003c \"\\n\";\n    return 0;\n\n}\n```\n\nTo compile and run:\n\n```sh\ng++ INIReaderTest.cpp -o INIReaderTest.out\n./INIReaderTest.out\n# Config loaded from 'test.ini': version=6, name=Bob Smith, email=bob@smith.com, pi=3.14159, active=1\n```\n","funding_links":[],"categories":["Configuration","Uncategorized","Data Formats"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtilly%2Finih","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjtilly%2Finih","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtilly%2Finih/lists"}