cjolowicz/retrocookie

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

Opened this issue · 1 comments

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.

{
  "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
}

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