3 ms·
I currently prefer using Protocol Buffers for configuration. You can use their built-in text formatter [1] to do plain-text configs. The default format isn't
by shaftway 10y ago
I currently prefer using Protocol Buffers for configuration. You can use their built-in text formatter [1] to do plain-text configs. The default format isn't terrible [2], but I've been thinking about using that code as the basis for a YAML or JSON version.
Then later when you want to automate generating bits of it, you can write simple Python (or whatever) scripts to transform the data. If you want the generated stuff to be less obvious or harder to change (just to stop people who can't help poking configs in production), write it in binary format.
(1) https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.text_format https://developers.google.com/protocol-buffers/docs/referenc...
(2) http://stackoverflow.com/questions/18873924/what-does-the-protobuf-text-format-look-like http://stackoverflow.com/questions/18873924/what-does-the-pr...