The configurator-export package

[Tags:bsd3, library, test]

Pretty printers and exporters for Configs from the configurator library, in Data.Configurator.

All results are intended to be valid parsing files in the configuration file syntax of the library.

For a full round trip:

 main = do
   cfg <- load [Required "config.cfg"]
   writeConf "config.cfg" cfg

This should load the config file, parse it, and then re-export it, rewriting the original config file. The result should be an identical configuration file (with keys potentially re-arranged and re-sorted, comments removed, etc.)

See the Data.Configurator.Export module for more details and ways to modify the output style.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1
Change log CHANGELOG.md
Dependencies base (>=4.6 && <5), base-compat, bifunctors, configurator, pretty, semigroups (>=0.17), text, unordered-containers [details]
License BSD3
Copyright (c) Justin Le 2016
Author Justin Le
Maintainer justin@jle.im
Stability Unknown
Category Configuration, Data
Home page http://github.com/mstksg/configurator-export
Source repository head: git clone https://github.com/mstksg/configurator-export
Uploaded Sun May 8 01:28:43 UTC 2016 by jle
Distributions LTSHaskell:0.1.0.1, NixOS:0.1.0.1, Stackage:0.1.0.1, Tumbleweed:0.1.0.1
Downloads 132 total (9 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2016-05-08 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for configurator-export

Readme for configurator-export-0.1.0.1

configurator-export

configurator-export on Stackage LTS 4 configurator-export on Stackage LTS configurator-export on Stackage Nightly

Build Status

Pretty printers and exporters for 'Config's from the great configurator library.

All results are intended to be valid parsing files in the configuration file syntax of the library.

For a full round trip:

main = do
  cfg <- load [Required "config.cfg"]
  writeConf "config.cfg" cfg

This should load the config file, parse it, and then re-export it, rewriting the original config file. The result should be an identical configuration file (with keys potentially re-arranged and re-sorted, comments removed, etc.)

Can also export/print any HashMap Name Value, in the form exported from a Config using getMap. Modify a map yourself to dynically generate/customize configuration files!

Sample output:

foo {
    bar {
        baz1  = true
        baz2  = [1, 0.6, "hello", true]
    }
    aardvark  = "banana"
    monkey    = [true, false, 1.9e-3]
    zebra     = 24
}

foo2 {
    bar = 8.1e-8
}

apple   = ["cake", true]
orange  = 8943

Further configuration on sorting of keys, displaying of bools and floats, etc. is possible by passing in custom ConfStyle style option values.