My ultimate goal is to change project's name depending on the context (root folder). In particular, I want to index my projects automatically, basing on the max number of matching folder names in the root, like:
cookiecutter.N = len(glob(root_dir + '/p2017_12_*')+1
However, there are two obstacles to that, from what I can see:
- there is no way currently how I can change
context from the hook. however, I hope that I can just rename the folder with sys in post_gen_hook as a quick-n-dirty solution.
- at the moment, there is no way my hook can see project directory, as it is never introduced as part of the context. It sounds like a simple fix, which I am going to purpose in the following PR
My ultimate goal is to change project's name depending on the context (root folder). In particular, I want to index my projects automatically, basing on the max number of matching folder names in the root, like:
However, there are two obstacles to that, from what I can see:
contextfrom the hook. however, I hope that I can just rename the folder withsysin post_gen_hook as a quick-n-dirty solution.