{"id":22293910,"url":"https://github.com/rtbo/libconfig-d","last_synced_at":"2026-03-19T22:20:19.551Z","repository":{"id":71972732,"uuid":"69323816","full_name":"rtbo/libconfig-d","owner":"rtbo","description":"Port of libconfig to the D programming language","archived":false,"fork":false,"pushed_at":"2016-10-16T16:40:16.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T19:27:00.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtbo.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-09-27T05:49:31.000Z","updated_at":"2017-01-12T19:43:09.000Z","dependencies_parsed_at":"2023-03-04T16:45:42.298Z","dependency_job_id":null,"html_url":"https://github.com/rtbo/libconfig-d","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtbo%2Flibconfig-d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtbo%2Flibconfig-d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtbo%2Flibconfig-d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtbo%2Flibconfig-d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtbo","download_url":"https://codeload.github.com/rtbo/libconfig-d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245550681,"owners_count":20633883,"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-12-03T17:33:07.855Z","updated_at":"2026-01-06T06:09:09.106Z","avatar_url":"https://github.com/rtbo.png","language":"D","readme":"# libconfig-d\n\nPort of [libconfig](http://www.hyperrealm.com/libconfig/) to the D programming language.\n\nexample:\n```d\nimport config;\nimport std.stdio;\n\nint main()\n{\n\t// read a configuration string (can also read from open file or filename)\n\tauto conf = Config.readString(\n\t\t`inventory = { books = (\n\t\t\t{\n\t\t\t\ttitle  = \"Treasure Island\";\n\t\t\t\tauthor = \"Robert Louis Stevenson\";\n\t\t\t\tprice  = 29.99;\n\t\t\t\tqty    = 5;\n\t\t\t}, {\n\t\t\t\ttitle  = \"Snow Crash\";\n\t\t\t\tauthor = \"Neal Stephenson\";\n\t\t\t\tprice  = 9.99;\n\t\t\t\tqty    = 8;\n\t\t\t}\n\t\t)}`\n\t);\n\n\t// fetch and read nodes\n\tauto books = conf.lookUp(\"inventory.books\").asList;\n\n    writeln(\"Available books in inventory:\");\n    writefln(\"%-30s  %-30s   %-6s  %s\", \"TITLE\", \"AUTHOR\", \"PRICE\", \"QTY\");\n    foreach (book; books.children)\n    {\n        auto title = book.lookUpValue!string(\"title\");\n        auto author = book.lookUpValue!string(\"author\");\n        auto price = book.lookUpValue!float(\"price\");\n        auto qty = book.lookUpValue!int(\"qty\");\n        if (!title.isNull \u0026\u0026 !author.isNull \u0026\u0026 !price.isNull \u0026\u0026 !qty.isNull)\n        {\n            writefln(\"%-30s  %-30s  $%6.2f  %3d\", title, author, price, qty);\n        }\n    }\n    writeln();\n\n\t// add nodes and values\n\tauto book = books.add!(Type.Group);\n\tbook.addScalar(\"title\", \"The Plague\");\n\tbook.addScalar(\"author\", \"Albert Camus\");\n\tbook.addScalar(\"price\", 8.99);\n\tbook.addScalar(\"qty\", 3);\n\n\t// write to a file (can also write to string)\n\tconf.writeTo(File(\"updated.cfg\", \"w\").lockingTextWriter());\n\n\treturn 0;\n}\n```","funding_links":[],"categories":["\u003ca name=\"D\"\u003e\u003c/a\u003eD"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtbo%2Flibconfig-d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtbo%2Flibconfig-d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtbo%2Flibconfig-d/lists"}