Open
Description
- Cookiecutter version:
1.6.0
- Template project url: private repo, of format
https://github.com/user/repo-name.git
- Python version:
3.6.5
or3.7.2
- Operating System:
Mac OS X 10.14.6
Description:
I would like my cookiecutter to function as a repo subdirectory (for example all of my cookiecutters as subdirectories in a single repo). Something like this:
cookiecutter https://github.com/user/repo-name.git --subdirectory="mycookiecutter"
or maybe --cd=""
instead of --subdirectory=""
🤔
What I've run:
cookiecutter https://github.com/user/repo-name.git
fails with
A valid repository for "https://github.com/user/repo-name.git" could not be found in the following locations:
/Users/romanhartmann/.cookiecutters/repo-name
I've gone through the cli.py
and found that there isn't an undocumented way to do this.
What I propose
I'll create a PR for this shortly, but basically:
cli.py
gets another option,--subdirectory
repository.py
receives the argument andcloned_repo = os.path.join(cloned_repo, subdirectory)
That's it really. Now cookiecutter works with subdirectories too!