[erlang-questions] [ann] econfig 0.4. released

Benoit Chesneau bchesneau@REDACTED
Sat Jun 22 22:12:56 CEST 2013


I just released econfig 0.4.0. econfig is a simple configuration
handler in Erlang. For now it only supports ini file.

New features are:

- add econfig:start/0 and econfig:stop/0 functions to start and stop
easily econfig in tests or on the shell.
- add `econfig:section/1`  function to get a list of all sections.
- add `econfig:prefix` function to get al l sections starting with Prefix
- add `econfig:cfg2list/2`  to retrieve all the configuration as a proplist
- add `econfig:cfg2list/3`  to retrieves all the config as a proplist
and group sections by key:
eg.

    3> econfig:cfg2list(test).
    [{"http \"private\"",[{"listen","192.168.1.2:8080"}]},
     {"http \"default\"",[{"listen","80"}]},
     {"http \"ssl\"",
      [{"listen","443"},
       {"ssl","on"},
       {"ssl_certficate","cert.pem"},
       {"ssl_certficate_key","cert.key"}]}]
    4> econfig:cfg2list(test, " ").
    [{"http",
      [{"\"private\"",[{"listen","192.168.1.2:8080"}]},
       {"\"default\"",[{"listen","80"}]},
       {"\"ssl\"",
        [{"listen","443"},
         {"ssl","on"},
         {"ssl_certficate","cert.pem"},
         {"ssl_certficate_key","cert.key"}]}]}]

- add `econfig:open_config/2`  and `econfig:open_config/3`  to open or
create a config file and register it.

Full changelog:

https://github.com/benoitc/econfig/compare/0.3.0...0.4.0

Coming features are:

- support for the toml  specification (https://github.com/mojombo/toml)
- support for json config
- allows distribution of the ocnfig over different machines/VMs.


Any feedback is appreciated :)


Enjoy!

- benoit



More information about the erlang-questions mailing list