Browser and install GUI for cookiecutter templates

⌈⌋ ⎇ branch:  cookiedough


Artifact [890b08f66d]

Artifact 890b08f66d400d68c56ca564e36e3ebf36f41e59906bc0a3d287e17959a5f98a:

Wiki page [settings] by mario 2021-03-24 09:06:02.
D 2021-03-24T09:06:02.131
L settings
N text/x-markdown
P d69f52e568941e08420d13d990a1651924b3430f1771e07d12b39715accfc466
U mario
W 3687

Use →File→Settings to access the cookiedough options menu.

 * Options are grouped by modules there.
 * Some may only take effect after a restart (e.g. hook_prompt).
 * Stored in ~/.config/cookiedough/settings.json.
 * There is no plugin handling in CD, so ticking the modules has no effect.


## Options

| name          | description                                                    |
|---------------|----------------------------------------------------------------|
| colorize      | Colorize the readme preview a bit                              |
| sort          | Primary scoring/sorting property                               |
| show_counts   | Show number of entries per language/api category               |
| editor        | Text editor (only used for cookiecutters config editing)       |
| replay        | Apply previously entered input variables                       |
| no_params     | Don't prompt for template vars. Use terminal prompts instead.  |
| update_ccjson | Update parameters from cookiecutter.json files                 |
| hook_prompt   | Display any additional prompts as GUI inputs                   |
| verbose       | Enable cookiecutter CLI debug logging                          |


### Sort (Scoring)

 Influences how templates are listed in the left pane. Normally they're
 ordered by "all" (a virtual score). But there's more fields internally:

| name          |avg/weight| description                                                    |
|---------------|----------------------------------------------------------------|
| short         | -       | display by short package name                        |
| name          | -       | display sorted by vendor/pkg name                    |
| **all**       | = 5.0   | cumulative weighted score                            |
| size          | 64      | overall size of repository (in kb)                   |
| stars         | 20      | project watchers/stars                               |
| forks         | 5       | number of github forks                               |
| tickets       | 10      | number of open tickets in repo                       |
| vars          | 7       | number of templating variables                       |
| files         | 32      | number of files in template                          |
| readme        | 2048    | length of README                                     |
| lang          | -0.9    | non-english text                                     |
| age           | 9 months| age of last release                                  |
| **bonus**     | +2.5    | tree listing, keywords, curated, descriptions        |
| curated       | +0.8    | previously listed in CC README                       |
| keywords      | +0.5    | has a _keywords field                                |
| descriptions  | +1.25   | contains field descriptions in README                |
| score.find    | +0.5*len| additional content/filenames to reward               |


Note that alphabetically sorting works best with the "short" project name, while the "name" represents the vnd/pkg title, so won't look very sorted in the tree list. Take note of →Template→Details to see how the scoring works on each entry (usually shown at the very end).

Not all fields are selectable in the config window. (Though you could edit the `~/.config/cookiedough/settings.json`)


### no_params / hook_prompt

Enabling **no_params** will avoid the input window when rolling out a
teplate.

If disabled, **hook_prompt** will keep input fields pop up as GUI windows.
Else you would get CLI prompts from cookiecutter directly.


Z a576fa739a10df6410fc4e4fbbe28e6d