{"id":13621791,"url":"https://github.com/theimpossibleastronaut/configster","last_synced_at":"2025-02-28T12:52:09.896Z","repository":{"id":41230788,"uuid":"283919634","full_name":"theimpossibleastronaut/configster","owner":"theimpossibleastronaut","description":"Rust library for parsing configuration files","archived":false,"fork":false,"pushed_at":"2024-02-28T05:14:36.000Z","size":36,"stargazers_count":19,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"trunk","last_synced_at":"2025-01-30T08:16:51.431Z","etag":null,"topics":["config","configuration-management","library","parser","rust","settings"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/theimpossibleastronaut.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","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-07-31T02:08:01.000Z","updated_at":"2023-07-25T14:37:59.000Z","dependencies_parsed_at":"2024-08-01T21:54:19.844Z","dependency_job_id":null,"html_url":"https://github.com/theimpossibleastronaut/configster","commit_stats":{"total_commits":31,"total_committers":4,"mean_commits":7.75,"dds":"0.22580645161290325","last_synced_commit":"c8d67fab632aa765840ab024df432563ac7f4ab6"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theimpossibleastronaut%2Fconfigster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theimpossibleastronaut%2Fconfigster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theimpossibleastronaut%2Fconfigster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theimpossibleastronaut%2Fconfigster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theimpossibleastronaut","download_url":"https://codeload.github.com/theimpossibleastronaut/configster/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241153625,"owners_count":19918837,"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":["config","configuration-management","library","parser","rust","settings"],"created_at":"2024-08-01T21:01:10.609Z","updated_at":"2025-02-28T12:52:09.890Z","avatar_url":"https://github.com/theimpossibleastronaut.png","language":"Rust","funding_links":[],"categories":["Libraries"],"sub_categories":["Configuration"],"readme":"[![Rust-badge]][Rust-url]\n[![crates-badge]][crates-url]\n\n[Rust-badge]: https://github.com/theimpossibleastronaut/configster/actions/workflows/rust.yml/badge.svg\n[Rust-url]: https://github.com/theimpossibleastronaut/configster/actions/workflows/rust.yml\n[crates-badge]: https://img.shields.io/crates/v/configster.svg\n[crates-url]: https://crates.io/crates/configster\n\n# configster\n\nRust library for parsing configuration files\n\n## Config file format\n\nThe 'option' can be any string with no whitespace.\n\n```ini\narbitrary_option = false\nmax_users = 30\n```\n\nThe value for an option following the equal sign may have \"attributes\"\nthat are separated by a delimiter. The delimiter is specified when\ncalling parse_file():\n\n```rust\nparse_file(\"./config_test.conf\", ',')\n```\n\n```ini\noption = Blue, light, shiny\n# option = nothing, void, empty, commented_out\n```\n\nAn option is not required to be followed by a value. It can be used to disable a default feature.\n\n```ini\nFeatureOff\n```\n\n## API\n\nCalling parse_file() will return a single vector containing a struct\n(OptionProperties) for each option line in the config file. The\nattributes for a value are stored in a vector within the \"Value\"\nstruct.\n\n```rust\n#[derive(Debug, PartialEq)]\npub struct Value {\n    pub primary: String,\n    pub attributes: Vec\u003cString\u003e,\n}\n\n#[derive(Debug, PartialEq)]\npub struct OptionProperties {\n    pub option: String,\n    pub value: Value,\n}\n```\n\n## Example Code\n\n```rust\nuse std::io;\n\nfn main() -\u003e Result\u003c(), io::Error\u003e {\n\n    let config_vec = configster::parse_file(\"./config_test.conf\", ',')?;\n\n    for i in \u0026config_vec {\n        println!(\"Option:'{}' | value '{}'\", i.option, i.value.primary);\n\n        for j in \u0026i.value.attributes {\n            println!(\"attr:'{}`\", j);\n        }\n        println!();\n    }\n    Ok(())\n}\n```\n\nSee [docs.rs/configster/](https://docs.rs/configster/)\nfor generated API documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheimpossibleastronaut%2Fconfigster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheimpossibleastronaut%2Fconfigster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheimpossibleastronaut%2Fconfigster/lists"}