Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vorpalblade/ini-merge
INI merging crate
https://github.com/vorpalblade/ini-merge
ini merge rust
Last synced: 9 days ago
JSON representation
INI merging crate
- Host: GitHub
- URL: https://github.com/vorpalblade/ini-merge
- Owner: VorpalBlade
- License: lgpl-3.0
- Created: 2023-04-07T10:27:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-20T16:23:04.000Z (6 months ago)
- Last Synced: 2024-05-20T19:25:59.010Z (6 months ago)
- Topics: ini, merge, rust
- Language: Rust
- Homepage:
- Size: 155 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Library to merge INI files subject to configuration
[ [crates.io] ] [ [lib.rs] ] [ [docs.rs] ]
This library forms the backend to [chezmoi_modify_manager]. You probably
want that tool instead.This library provides processing of INI files. In particular:
* Merging of a source INI file with a target INI file.
The merging is asymmetric: The values of the source are preferred unless
specific rules have been provided for those sections and/or keys.
Formatting is preserved.
* Filtering of an INI file based on a rule setThe use case of this is configuration management for user settings file where
the program writes a mix of settings and state to the same file. This gets
messy if we want to track the settings part in git using a tool like [chezmoi].A typical example of this is KDE settings files. These contain (apart from
settings) state like recently opened files and positions of windows and dialog
boxes. Other programs (such as PrusaSlicer) also do the same thing.This library can be used as a backend to implement a tool to smartly merge
such INI files. Such a tool is already available: [chezmoi_modify_manager].## MSRV
Current minimum supported Rust version is 1.75.0. This may be updated as
needed. MSRV bump is not considered a semver breaking change.[chezmoi_modify_manager]: https://github.com/VorpalBlade/chezmoi_modify_manager
[chezmoi]: https://www.chezmoi.io/
[crates.io]: https://crates.io/crates/ini-merge
[docs.rs]: https://docs.rs/ini-merge
[lib.rs]: https://lib.rs/crates/ini-merge