Repository: beetbox/beets

Issue:
Expose import.incremental_skip_later config option as CLI option
To reduce the time needed for manual prompting during the import of a large number of tracks and to import as much as possible without prompting, I run the import once with the `-i --quiet` options and the `import.incremental_skip_later` config option enabled and then again without the `--quiet` option and `import.incremental_skip_later` disabled within the configuration, letting beets prompt for the previously skipped tracks only.
However, currently that requires me to change the configuration file during the workflow which I'd like to avoid.
<!--
If you're landing here as a user, we ask you bring up your idea in the
Discussions (https://github.com/beetbox/beets/discussions).
-->

### Proposed solution

In addition to the configuration file the  `import.incremental_skip_later` option should be configurable via the CLI as e.g. `--incremental-skip-later` option of the `import` command.

Usage example:
```sh
beet import -siq --incremental-skip-later # no questions asked, tracks skipped in doubt
beet import -si                           # prompting for previously skipped tracks only
```

### Objective

<!-- Ref to Discussions -->

#### Goals

<!-- What is the purpose of feature request? -->
Improving the import workflow / making the import command more flexible.

#### Non-goals

<!--
What else could be accomplished with this feature request, but is currently out
of scope?
-->
Changing the import behaviour internally.

#### Anti-goals

<!--
What could go wrong (side effects) if we implement this feature request?
-->
Any additional complexity or more prompts. :smile: 
Expose import.incremental_skip_later config option as CLI option
To reduce the time needed for manual prompting during the import of a large number of tracks and to import as much as possible without prompting, I run the import once with the `-i --quiet` options and the `import.incremental_skip_later` config option enabled and then again without the `--quiet` option and `import.incremental_skip_later` disabled within the configuration, letting beets prompt for the previously skipped tracks only.
However, currently that requires me to change the configuration file during the workflow which I'd like to avoid.
<!--
If you're landing here as a user, we ask you bring up your idea in the
Discussions (https://github.com/beetbox/beets/discussions).
-->

### Proposed solution

In addition to the configuration file the  `import.incremental_skip_later` option should be configurable via the CLI as e.g. `--incremental-skip-later` option of the `import` command.

Usage example:
```sh
beet import -siq --incremental-skip-later # no questions asked, tracks skipped in doubt
beet import -si                           # prompting for previously skipped tracks only
```

### Objective

<!-- Ref to Discussions -->

#### Goals

<!-- What is the purpose of feature request? -->
Improving the import workflow / making the import command more flexible.

#### Non-goals

<!--
What else could be accomplished with this feature request, but is currently out
of scope?
-->
Changing the import behaviour internally.

#### Anti-goals

<!--
What could go wrong (side effects) if we implement this feature request?
-->
Any additional complexity or more prompts. :smile: 


Discussion:
That shouldnt be too hard to implement. If you code Python and submit a PR I can review and assist 😀
That shouldnt be too hard to implement. If you code Python and submit a PR I can review and assist 😀

Resolving patch:
diff --git a/beets/ui/commands.py b/beets/ui/commands.py
--- a/beets/ui/commands.py
+++ b/beets/ui/commands.py
@@ -1506,6 +1506,20 @@ def import_func(lib, opts, args):
     action="store_false",
     help="do not skip already-imported directories",
 )
+import_cmd.parser.add_option(
+    "-R",
+    "--incremental-skip-later",
+    action="store_true",
+    dest="incremental_skip_later",
+    help="do not record skipped files during incremental import",
+)
+import_cmd.parser.add_option(
+    "-r",
+    "--noincremental-skip-later",
+    action="store_false",
+    dest="incremental_skip_later",
+    help="record skipped files during incremental import",
+)
 import_cmd.parser.add_option(
     "--from-scratch",
     dest="from_scratch",


Test patch: