Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options to avoid prompts #41

Merged
merged 3 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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