-
Notifications
You must be signed in to change notification settings - Fork 1
INI-like file loader for Erlang
License
dozzie/eni
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
== ENI == IMPORTANT NOTE: this project uses custom file format, and as such, it's deprecated. It's recommended to use an already popular format, like TOML. A TOML parser by the same author as ENI can be found here: http://dozzie.jarowit.net/trac/wiki/TOML ENI is a configuration format based on dead-simple INI known from DOS and Windows. ENI is a superset of (one of the variants of) INI -- ENI additionally supports Erlang terms in config. ENI is not intended to be used inside typical Erlang application. There is already well established practice of keeping default configuration in `*.app' file and customizing it by setting environment. ENI is meant mainly for maintainers writing tools that interact with system administrator. Such tools usually are scripts for starting a daemon or command line tools, standalone or for issuing commands to a daemon. == Examples == Usage examples: % loading config from file {ok, Conf} = eni:file("file.eni"), % loading config from in-memory string {ok, Conf} = eni:string("..."), {Opts, Sections} = Conf, Foo = proplists:get_value(foo, Opts), BarSect = proplists:get_value(bar, Sections), Bar_Baz = proplists:get_value(baz, BarSect). Short example of ENI file: ; traditional INI comment # more "unixish" comment % and "erlangish" comment pid_file = /var/run/erl_daemon.pid enabled_services := [http, https]. [http] bind = 127.0.0.1 port := [8080, 8880]. [https] bind := any. port = 8443 ssl_cert = /etc/erl_daemon/cert.pem ssl_key = /etc/erl_daemon/key.pem == Contact == ENI was written by Stanislaw Klekot <dozzie at jarowit.net>. The primary distribution point is <http://dozzie.jarowit.net/>, with a secondary address on GitHub <https://github.com/dozzie/eni>. ENI is distributed under 3-clause BSD license.
About
INI-like file loader for Erlang
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published