audreyr/cookiecutter — pull request #173 by saxix (2014-05-08 11:31:21+00:00)
Title: Feature/better prompt support

extend the prompt capabilities to:

- variable substitution
- differentiate prompt/default value and variable name
- specify type of variable int/bool

```
{
"project_name": "project-name",
"project_key": "{project_name}", # <- default value based on previous input
"create_virtualenv" : {
"default": "N",
"type": "bool",
"prompt": "Create virtualenv (`{project_name}`) [yN]" # variable subtitution using .format()
},
"year": {
"default" : "2014",
"type" : "int"
},
'user' : '{$USER}' # will be os.environ['USER']
}
```

this produce the following dictionary ( if default values accepted):
```
{ "project_name": "project-name",
"project_key": "project-name",
"create_virtualenv" : False,
"year" : 2014,
"user": "username"
}
```