<commit_before>confuzzle
=========

**A tiny tool for generating configuration files by combining [Jinja2](http://jinja.pocoo.org/docs/) templates with [YAML](http://www.yaml.org/) data.**

**Author:** <NAME>. [Follow me on Twitter](http://twitter.com/j4mie).

When deploying an application, you often need to create configuration files for various components (databases, web servers, reverse proxies, etc). Often, the **same** value needs to appear in **multiple** places (for example, a port number that servers should bind to and clients should connect to). `confuzzle` lets you store all of your app config in one place (possibly outside of version control), and combine it with your templated config files at build time.

Example
-------

In your `gunicorn.py.tmpl`:

```jinja
bind = "127.0.0.1:{{ gunicorn.port }}"
```

In your `nginx.conf.tmpl`:

```jinja
upstream app_server {
    server 127.0.0.1:{{ gunicorn.port }} fail_timeout=0;
}
```

Here's your `config.yaml`

```yaml
gunicorn:
  port: 8080
```

By default, confuzzle reads from `stdin` and writes to `stdout`. To use:

```console
confuzzle config.yaml < gunicorn.py.tmpl > gunicorn.py
confuzzle config.yaml < nginx.conf.tmpl > nginx.conf
```

Now, your files look like this:

```jinja
bind: "bind = "127.0.0.1:8080"
```

```jinja
upstream app_server {
    server 127.0.0.1:8080 fail_timeout=0;
}
```

You can also supply a list of YAML files. This might be useful if you'd like to combine a general config file (in version control) with a file containing secrets such as database passwords (not in version control).

```console
confuzzle config.yaml secrets.yaml < settings.py.tmpl > settings.py
```

See `confuzzle --help` for the full list of arguments.

Prints to stdout the result of combining gunicorn_template.conf with the yaml data in config.yaml

Changelog
---------

#### 0.1.0

* Initial release.

Installation
------------

**Not yet on PyPI! Clone the repo and `python setup.py develop`**

You can install confuzzle from PyPI:

    pip install confuzzle

## Development

To contribute: fork the repository, make your changes, add some tests, commit,
push to a feature branch, and open a pull request.

## (Un)license
<commit_msg>Remove old line from README<commit_after>confuzzle
=========

**A tiny tool for generating configuration files by combining [Jinja2](http://jinja.pocoo.org/docs/) templates with [YAML](http://www.yaml.org/) data.**

**Author:** <NAME>. [Follow me on Twitter](http://twitter.com/j4mie).

When deploying an application, you often need to create configuration files for various components (databases, web servers, reverse proxies, etc). Often, the **same** value needs to appear in **multiple** places (for example, a port number that servers should bind to and clients should connect to). `confuzzle` lets you store all of your app config in one place (possibly outside of version control), and combine it with your templated config files at build time.

Example
-------

In your `gunicorn.py.tmpl`:

```jinja
bind = "127.0.0.1:{{ gunicorn.port }}"
```

In your `nginx.conf.tmpl`:

```jinja
upstream app_server {
    server 127.0.0.1:{{ gunicorn.port }} fail_timeout=0;
}
```

Here's your `config.yaml`

```yaml
gunicorn:
  port: 8080
```

By default, confuzzle reads from `stdin` and writes to `stdout`. To use:

```console
confuzzle config.yaml < gunicorn.py.tmpl > gunicorn.py
confuzzle config.yaml < nginx.conf.tmpl > nginx.conf
```

Now, your files look like this:

```jinja
bind: "bind = "127.0.0.1:8080"
```

```jinja
upstream app_server {
    server 127.0.0.1:8080 fail_timeout=0;
}
```

You can also supply a list of YAML files. This might be useful if you'd like to combine a general config file (in version control) with a file containing secrets such as database passwords (not in version control).

```console
confuzzle config.yaml secrets.yaml < settings.py.tmpl > settings.py
```

See `confuzzle --help` for the full list of arguments.

Changelog
---------

#### 0.1.0

* Initial release.

Installation
------------

**Not yet on PyPI! Clone the repo and `python setup.py develop`**

You can install confuzzle from PyPI:

    pip install confuzzle

## Development

To contribute: fork the repository, make your changes, add some tests, commit,
push to a feature branch, and open a pull request.

## (Un)license

{'fraction_non_alphanumeric': 0.12970228479113777, 'fraction_numerical': 0.019847680590814678, 'mean_word_length': 4.016203703703703, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1605678', 'n_tokens_mistral': 1443, 'n_tokens_neox': 1320, 'n_words': 534}