bos/configurator — pull request #14 by daniel-r-austin (2013-04-24 02:42:16+00:00)
Title: Added functions and types for generating config file

I added some functions and types for generating a config file. Below is the sample output from the a new writeTest:

# This is a test comment
# And here is a new one

import "pathological.cfg"
myBindVar = "here's my bind string"
myInt = 32 # This is a trailing comment as part of a bind
# Ok, let's try a group now
group1 {
# Starting group 1
group1a = 7
group1b = 90
group2 {
# I am nested!
import "import.cfg"
group2a = "nested var"
}
# End the group
}

# A couple more binds for good measure
penultimate = "almost"
final = "there"

It's pretty rudimentary but I expect it to flexible enough (if not convenient) to handle most use cases. The default tab size of two spaces is not currently configurable.