Browser and install GUI for cookiecutter templates

βŒˆβŒ‹ βŽ‡ branch:  cookiedough


Update of "improve"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: d63af5e9a3d449f8ee8b38576584247c1893feda5d2307a0e31a2b0274bdc4a8
Page Name:improve
Date: 2021-03-23 07:03:16
Original User: mario
Mimetype:text/x-markdown
Parent: 2d5cf675e737b1973a52a68319fdb847e6143b9f1f0c3316325682ba35f1d421 (diff)
Next 1170f6cc15e917154f94916aa4aa53832e05385f28e1dae0c01d55b9616782d5
Content

Improve your cookiecutter.json

cookiedough accepts some additional fields from cookiecutters.json. This helps both the parameter input, as well as grouping, search and scoring/sorting of entries.

Currently following options are recognized:

Where Name Usage
cookiecutters.json _api Override the category/language (could be an app name, e.g. flask)
cookiecutters.json _keywords Add extra search keywords/tags (comma/space-separated string)
cookiecutters.json _requirements Build dependencies (a JSON list), for example ["poetry", "pipenv", "pluginconf"]
cookiecutters.json _license License of the cookiecutter template itself. Ideally ought to be "PD" or "CC0". If attribution/academic licsense ("MITL" or "BDSL"), the template should note itself in the generated README or CREDITS, etc.
README.* markdown Describe all template variables, using a "❙varname❙Explanation...❙" table

For example:

 {
     "project_slug": "base-name",
     "_api": "django",
     "_keywords": "make-whl, xdg, pytest, mkdocs",
     "_license": "CC0",
     "_requirements": ["poetry", "pep517"]
 }

Whereas your README should contain explanations for template vars:

 | Variable       | Explanation ...                        |
 |----------------|----------------------------------------|
 | `project_slug` | basename for created project directory |
 | `proj_license` | ...                                    |

Why "scoring"?

Ordering just alphabetically or by github stars isn't all that useful. Stars are simply accrued for older projects. It's often just bandwagon voting even.

Instead cookiedough takes multiple properties into account, and somewhat weighs them against each other. Average projects are favoured, and some contents rewarded. It's not a huge influence, but hopefully brings more contemporary templates to the top.

See cookiedough/update.py on how the default scoring works. (This is going to be come more configurable.)