2

I've been reading about cookiecutter as a way of instantiating project templates. The projects I'm interested in templating typically contain a bunch of different sub-project types such as C++ software, microcontroller-specific firmware, PCB schematic/layout, FPGA HDL, etc. Describing each sub-project type is easy with Cookiecutter, but is there a way to make a master cookiecutter that calls the appropriate sub-project cookiecutter at a given point? I haven't seen anything in the docs/tutorials that talk about this kind of recursive mode of operation.

Hooked
  • 84,485
  • 43
  • 192
  • 261

1 Answers1

1

I've used the internal Cookiecutter API in Python scripts so I can generate multiple components quickly. The method is described here: http://cookiecutter.readthedocs.org/en/latest/advanced_usage.html#calling-cookiecutter-functions-from-python

I also think this would be an interesting use of a post_gen_project.py hook. I'll try and get that working.

pydanny
  • 7,954
  • 6
  • 34
  • 42