1
0
Fork 0
A CLI tool to overwrite configuration files using profiles
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Daniele Tricoli 171e3168e3 Mention the -w flag 5 years ago
src Show warnings for keys present only in profiles 5 years ago
.gitignore Initial import 5 years ago
.travis.yml Add travis CI configuration 5 years ago
CHANGELOG.md Update CHANGELOG 5 years ago
Cargo.lock Add forgotten bump to 0.2.1 5 years ago
Cargo.toml Switch to 2018 edition 5 years ago
LICENSE Add license 5 years ago
README.md Mention the -w flag 5 years ago
rustfmt.toml Add rustfmt config 5 years ago

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++