output envdir as JSON or YAML
Project description
cfgdir
Read envdir style configuration directory and output as JSON
I'm a long-time fan of DJB's envdir
I'm pleased by the simple power of using the filesystem as your database, and the freedom to manipulate the configuration data in any way one choses.
Rather than running another program with the configuration in environment variables, this program outputs a stream in JSON format. This output can be captured in a file or piped into stdin of another program.
Interface
cfgdir d
reads a JSON object from stdin, then reads the directory named d, outputting a JSON object modified according to files in d.
The format of d is as follows: (adapted from envdir's documentation)
If d contains a file named s whose first line is t, cfgdir's output will contain an element named s with string value t. The name s must not contain =. Spaces and tabs at the end of t are removed. Nulls in t are changed to newlines.
If the file s is completely empty (0 bytes long) cfgdir will remove the element named s if it exists.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cfgdir-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ee52e8ff4469a3fefc119faa1067eb8414515da2cbce6413364701e2ec1e9fc |
|
MD5 | fafd989405c84b2dfb546449195cffd7 |
|
BLAKE2b-256 | 2d979ab2aeca7660722b61ff8d7b5c4ca3a03eee0524aee22cf59f1e78a4df0a |