cjolowicz / retrocookie

Retrocookie updates Cookiecutter templates with changes from generated projects
https://retrocookie.readthedocs.io
MIT License
29 stars 7 forks source link

Add cruft compatibility, read from `.cruft.json` #755

Open MicaelJarniac opened 1 year ago

MicaelJarniac commented 1 year ago

https://github.com/cruft/cruft https://cruft.github.io/cruft/

cruft is, at least for me, mainly to automate updating a project with the latest version of the template used to generate it.

It generates a .cruft.json similar to .cookiecutter.json, with the values of the variables, and some additional data.

It'd be really nice if Retrocookie could also read that file, so as to avoid having to keep both of them in a project.

.cruft.json:

Contents > **Note** > The template used was from a local folder, not from GitHub, but it works the same. ```json { "template": "/home/micael/projects/cookiecutter-python-project", "commit": "a636bfd8d49f9e295dff47de6dd043ee97450e2f", "checkout": null, "context": { "cookiecutter": { "full_name": "Author Name", "email": "author@example.com", ... "_template": "/home/micael/projects/cookiecutter-python-project" } }, "directory": null } ```
MicaelJarniac commented 1 year ago

I've opened a PR for this at #756.