1
0
Fork 0
A CLI tool to overwrite configuration files using profiles
Go to file
Daniele Tricoli 716282eaee Remove Travis 2021-02-09 17:28:43 +01:00
src Show warnings for keys present only in profiles 2018-12-08 18:55:32 +01:00
.gitignore Initial import 2018-11-16 01:33:03 +01:00
CHANGELOG.md Update for 0.3.0 release 2018-12-08 19:34:03 +01:00
Cargo.lock Bump to 0.3.0 2018-12-08 19:34:44 +01:00
Cargo.toml Bump to 0.3.0 2018-12-08 19:34:44 +01:00
LICENSE Add license 2018-11-19 01:31:38 +01:00
README.md Mention the -w flag 2018-12-08 19:30:57 +01:00
rustfmt.toml Add rustfmt config 2018-12-07 01:03:27 +01:00

README.md

conf-form

A CLI tool to overwrite configuration files using profiles.

The configuration file is parsed using a simplified parser for zeroc configuration.

Only keys in the configuration file are overwritten, if the profile contains a key not present in the configuration file it's ignored.

Examples

Given the following configuration file:

 cat conf.txt
Author.Name = eriol
# This comment will be stripped out
Author.Like = rust, python

and the following profile p1.yaml:

# Yes, I like all of them.
Author.Like: rust, python, c++
The.cake.is: a lie # this will be ignored since not in the configuration file

conf-form will produce:

 conf-form --config conf.txt --profile p1.yaml
Author.Name = eriol
Author.Like = rust, python, c++

Warnings for keys only present in profiles can be showed using -w flag.

 conf-form -w --config conf.txt --profile p1.yaml
Warning: The.cake.is key is not present in config file.
Author.Name = eriol
Author.Like = rust, python, c++