- Removed obsolete tasks.md from 001-sequence-numbering. - Added detailed requirements checklist for sequence numbering command. - Created OpenAPI contract for sequence command, defining preview and apply endpoints. - Developed data model for sequence numbering, outlining key entities and their relationships. - Drafted implementation plan for sequence numbering command, including project structure and complexity tracking. - Compiled quickstart guide for sequence numbering command, detailing prerequisites and usage examples. - Documented research findings related to command validation, ordering, and conflict handling. - Established feature specification for sequence numbering command, including user scenarios and acceptance criteria. - Created tasks.md for 007-sequence-numbering, outlining phases and implementation strategy.
56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
# Quickstart: Sequence Numbering Command
|
|
|
|
## Prerequisites
|
|
- Go 1.24 toolchain installed.
|
|
- `renamer` repository cloned and bootstrapped (`go mod tidy` already satisfied in repo).
|
|
- Test fixtures available under `tests/` for validation runs.
|
|
|
|
## Build & Install
|
|
```bash
|
|
go build -o bin/renamer ./cmd/renamer
|
|
```
|
|
|
|
## Preview Sequence Numbering
|
|
```bash
|
|
bin/renamer sequence \
|
|
--path ./fixtures/sample-batch \
|
|
--dry-run
|
|
```
|
|
Outputs a preview table showing `001_`, `002_`, … prefixes based on alphabetical order.
|
|
|
|
## Customize Formatting
|
|
```bash
|
|
bin/renamer sequence \
|
|
--path ./fixtures/sample-batch \
|
|
--start 10 \
|
|
--width 4 \
|
|
--number-prefix seq \
|
|
--separator "" \
|
|
--dry-run
|
|
```
|
|
Produces names such as `seq0010file.ext`. Errors if width/start are invalid.
|
|
|
|
## Apply Changes
|
|
```bash
|
|
bin/renamer sequence \
|
|
--path ./fixtures/sample-batch \
|
|
--yes
|
|
```
|
|
Writes rename results to the `.renamer` ledger while skipping conflicting targets and warning the user.
|
|
|
|
## Undo Sequence Batch
|
|
```bash
|
|
bin/renamer undo --path ./fixtures/sample-batch
|
|
```
|
|
Restores filenames using the most recent ledger entry.
|
|
|
|
## Run Automated Tests
|
|
```bash
|
|
go test ./...
|
|
tests/integration/remove_flow_test.go # existing suites ensure regressions are caught
|
|
```
|
|
|
|
## Troubleshooting
|
|
- Conflict warnings indicate existing files with the same numbered name; resolve manually or adjust flags.
|
|
- Zero candidates cause a 409-style error; adjust scope flags to include desired files.
|