https://github.com/memowe/trivialini
Ultra light weight ini file parser
https://github.com/memowe/trivialini
config haskell haskell-library ini lightweight parser
Last synced: 8 months ago
JSON representation
Ultra light weight ini file parser
- Host: GitHub
- URL: https://github.com/memowe/trivialini
- Owner: memowe
- License: mit
- Created: 2021-03-10T17:10:31.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-03T10:31:25.000Z (about 2 years ago)
- Last Synced: 2025-10-02T17:54:20.033Z (9 months ago)
- Topics: config, haskell, haskell-library, ini, lightweight, parser
- Language: Haskell
- Homepage: https://mirko.westermeier.de/trivialini
- Size: 68.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# trivialini
**Ultra light weight ini file parser, written in Haskell**
[](https://github.com/memowe/trivialini/actions/workflows/test-apidocs.yml)
[](https://mirko.westermeier.de/trivialini/Trivialini.html)
## Overview
Consider a simple ini-like file `config.ini` like this:
```
[something]
foo = bar
[something else]
answer = 42
name = Boaty McBoatface
```
There are two *sections* (inbetween `[` and `]`) defined, `something` and `something else`. These sections contain a dictionary of Strings each, the keys being some string followed by `=`, and anything else until end of the line as values. The leading and trailing spaces in section headers, keys and values are trimmed.
**trivialini** simply parses a map of maps of strings from this data:
```bash
$ cat config.ini
[foo]
bar = 42
```
```
λ> ini <- readIniFileStrings "config.ini"
λ> ini ! "foo" ! "bar"
"42"
```
## Contributors
[](CODE_OF_CONDUCT.md)
- Alexander Pankoff ([@ccntrq](https://github.com/ccntrq))
- Mirko Westermeier ([@memowe](https://github.com/memowe))
## Author and License
Copyright (c) 2021-2024 Mirko Westermeier
Released under the MIT license. See [LICENSE](LICENSE) for details.