Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rlee287/ini_merge
https://github.com/rlee287/ini_merge
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rlee287/ini_merge
- Owner: rlee287
- Created: 2022-06-24T18:26:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T05:29:54.000Z (5 months ago)
- Last Synced: 2024-12-24T01:15:14.258Z (11 days ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ini_merge
A simple utility to merge `.ini` config files. Assumes that files have no duplicate keys.
```
Usage: ini_merge base_file patch_file output_file
```Semantics of ini_merge behavior:
- Comments are stripped and not parsed
- Keys that do not overlap will both be inserted into the output, with `patch_file` keys coming after `base_file` keys
- Keys and values in `patch_file` will overwrite ones in `base_file`
- Keys overwritten with `patch_file` changes will be placed separately from keys in a section
- If a key occurs multiple times in `base_file`, all occurences of it will be removed if replaced by a key in the `patch_file`.
- If a key occurs multiple times in `patch_file`, only the "final" occurence of the key will be included in output_file