Add configurable sequence numbering command
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Add `renamer sequence` subcommand with configurable numbering (start, width, placement—default prefix—separator, number prefix/suffix) and ledger-backed apply/undo flows.
|
||||
- Add `renamer remove` subcommand with sequential multi-token deletions, empty-name safeguards, and ledger-backed undo.
|
||||
- Document remove command ordering semantics, duplicate warnings, and automation guidance.
|
||||
- Add `renamer replace` subcommand supporting multi-pattern replacements, preview/apply/undo, and scope flags.
|
||||
|
||||
@@ -53,6 +53,23 @@ renamer insert <position> <text> [flags]
|
||||
- Insert after third character in stem: `renamer insert 3 _tag --path ./images --dry-run`
|
||||
- Combine with extension filter: `renamer insert ^ "v1_" --extensions .txt|.md`
|
||||
|
||||
## Sequence Command Quick Reference
|
||||
|
||||
```bash
|
||||
renamer sequence [flags]
|
||||
```
|
||||
|
||||
- Applies deterministic numbering to filenames using the active scope filters; preview-first by default.
|
||||
- Default behavior prepends a three-digit number using an underscore separator (e.g. `001_name.ext`).
|
||||
- Flags:
|
||||
- `--start` (default `1`) sets the initial sequence value (must be ≥1).
|
||||
- `--width` (optional) enforces minimum digit width with zero padding; the command auto-expands and warns when more digits are required.
|
||||
- `--placement` (`suffix` default, `prefix` alternative) controls whether numbers prepend or append the stem.
|
||||
- `--separator` customizes the string placed between the stem and number; path separators are rejected.
|
||||
- `--number-prefix` / `--number-suffix` add static text directly before or after the digits (use with `--placement prefix` for labelled sequences such as `seq001-file.ext`).
|
||||
- Set `--separator ""` to remove the underscore separator when prefixing numbers (e.g. `seq001file.ext`).
|
||||
- Conflicting targets are skipped with warnings while remaining files continue numbering; directories included via `--include-dirs` are listed but unchanged.
|
||||
|
||||
## Remove Command Quick Reference
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user