Is there a way to machine-generate some values, after the user has supplied some their values for the variables in cookiecutter.json
?
The reason I ask is that:
- one of the values I need to prompt for is rather hard for users to work out
- but it's really easy for me to write some Python code to generate the right value
So I'd really like to be able to remove the user prompt, and calculate the value instead.
Things I've tried:
- Searched online for an example
pre_gen_project.py
file to show how to do it - Read the cookiecutter Advanced Usage page
I'm using cookiecutter on the command line:
cookiecutter path_to_template
Am I missing any tricks?