Implement sequences feature v1.1.0

- Add -s/--sequence option to select transformation sequences
- Add -L flag to list all available sequences
- Implement 5 hardcoded sequences: default, lower, upper, minimal, utf-8
- Refactor clean_filename() to support sequence-based transformations
- Update all tests to pass sequence parameter (25 tests passing)
- Add 8 new integration tests for sequence functionality
- Update documentation (README, CHANGELOG, manpage)
- Update shell completions (bash, zsh, fish)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
jamulix 2026-02-10 18:38:23 +01:00
commit 0ba2057514
12 changed files with 501 additions and 52 deletions

View file

@ -39,6 +39,27 @@ specified paths and their immediate children by default. Use the `-r` or
# New (v1.x): ntu -r /path/to/files
```
## Sequences
Starting with v1.1.0, `ntu` supports transformation sequences similar to detox. Sequences control how filenames are transformed:
- **default**: Standard transformation (umlauts→ASCII, spaces→underscores, remove special chars)
- **lower**: Like default, but convert to lowercase
- **upper**: Like default, but convert to UPPERCASE
- **minimal**: Only replace spaces, keep UTF-8 characters
- **utf-8**: UTF-8 friendly (keep umlauts, replace spaces, remove special chars)
```bash
# Use specific sequence
ntu -s lower /path/to/files
# List all available sequences
ntu -L
# List sequences with details
ntu -L -v
```
## Functions / Funktionen
- Replaces spaces and special characters in file and directory names with underscores
@ -146,6 +167,20 @@ ntu -r --modify-root /path/to/files
# Combine options
ntu --dry-run -r -v --special /path/to/files
# Use lowercase sequence
ntu -r -s lower /path/to/files
# Minimal mode (only spaces, keep UTF-8)
ntu -s minimal /path/to/files
# UTF-8 friendly mode
ntu -s utf-8 /path/to/files
# List available sequences
ntu -L
# List sequences with details
ntu -L -v
```
**Note:** The following directories/files are automatically excluded:
@ -185,6 +220,20 @@ ntu -r --modify-root /pfad/zu/dateien
# Optionen kombinieren
ntu --dry-run -r -v --special /pfad/zu/dateien
# Kleinbuchstaben-Sequenz verwenden
ntu -r -s lower /pfad/zu/dateien
# Minimal-Modus (nur Leerzeichen, UTF-8 behalten)
ntu -s minimal /pfad/zu/dateien
# UTF-8 freundlicher Modus
ntu -s utf-8 /pfad/zu/dateien
# Verfügbare Sequenzen auflisten
ntu -L
# Sequenzen mit Details auflisten
ntu -L -v
```
**Hinweis:** Die folgenden Verzeichnisse/Dateien werden automatisch ausgeschlossen: