Skip to content

Commit

Permalink
Merge pull request #41 from plone/add-options-avoid-prompts
Browse files Browse the repository at this point in the history
Add options to avoid prompts
  • Loading branch information
davisagli authored Sep 29, 2024
2 parents bff41f9 + 62a132e commit 5d538f1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ pipx run cookieplone

Cookieplone will walk you through the necessary steps, using sensible defaults and offering customization options where needed.

### Use options to avoid prompts

Cookieplone will ask a lot of questions.
You can use some of its options to avoid repeatedly entering the same values.

#### `--no-input`

You can use the [`--no-input`](https://cookiecutter.readthedocs.io/en/latest/cli_options.html#cmdoption-cookiecutter-no-input) option to make Cookieplone not prompt for parameters and only use `cookiecutter.json` file content.

#### `--replay` and `--replay-file`

You can use the options [`--replay`](https://cookiecutter.readthedocs.io/en/latest/cli_options.html#cmdoption-cookiecutter-replay) and [`--replay-file`](https://cookiecutter.readthedocs.io/en/latest/cli_options.html#cmdoption-cookiecutter-replay-file) to not prompt for parameters and only use information entered previously or from a specified file.
See [Replay Project Generation](https://cookiecutter.readthedocs.io/en/latest/advanced/replay.html) in the cookiecutter documentation for more information.

### Specify a template

You can also specify other templates.
Expand Down
2 changes: 1 addition & 1 deletion cookieplone/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def cli(
no_input: Annotated[
bool,
typer.Option(
"--no_input",
"--no-input",
help=(
"Do not prompt for parameters and only use cookiecutter.json "
"file content. Defaults to deleting any cached resources and "
Expand Down
1 change: 1 addition & 0 deletions news/41.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename the `--no_input` option to `--no-input` for consistency with other options. @davisagli

0 comments on commit 5d538f1

Please sign in to comment.