neue Optionen (-r, Installskript) installiert
This commit is contained in:
parent
0bab728d62
commit
d78e318d8a
15 changed files with 273 additions and 42 deletions
60
README.md
60
README.md
|
|
@ -27,6 +27,18 @@ Dies ist mein erstes Programm in Rust. (Bitte seid gnädig.)
|
|||
|
||||
(c) 2025 Dieter Schlüter <dieter.schlueter@linix.de>
|
||||
|
||||
## ⚠️ BREAKING CHANGE in v1.0.0
|
||||
|
||||
**Recursion is now opt-in**: As of version 1.0.0, `ntu` processes only the
|
||||
specified paths and their immediate children by default. Use the `-r` or
|
||||
`--recursive` flag to enable recursive directory traversal.
|
||||
|
||||
**Migration**: Add `-r` to your existing commands:
|
||||
```bash
|
||||
# Old (v0.x): ntu /path/to/files
|
||||
# New (v1.x): ntu -r /path/to/files
|
||||
```
|
||||
|
||||
## Functions / Funktionen
|
||||
|
||||
- Replaces spaces and special characters in file and directory names with underscores
|
||||
|
|
@ -103,30 +115,36 @@ sudo mandb # Update man database
|
|||
## Usage
|
||||
|
||||
```bash
|
||||
# Basic usage
|
||||
# Basic usage (non-recursive: only immediate children)
|
||||
ntu /path/to/files
|
||||
|
||||
# Recursive processing (process subdirectories)
|
||||
ntu -r /path/to/files
|
||||
|
||||
# Dry-run: only preview the changes without actual renaming
|
||||
ntu --dry-run /path/to/files
|
||||
ntu -n /path/to/files # Short form
|
||||
ntu --dry-run -r /path/to/files
|
||||
ntu -n -r /path/to/files # Short form
|
||||
|
||||
# Use specific config file
|
||||
ntu --conf /path/to/custom.toml /path/to/files
|
||||
|
||||
# Process multiple paths
|
||||
ntu /path1 /path2 /path3
|
||||
ntu -r /path1 /path2 /path3
|
||||
|
||||
# Exclude specific files
|
||||
ntu -e "*.tmp" -e "backup_*" /path/to/files
|
||||
ntu -r -e "*.tmp" -e "backup_*" /path/to/files
|
||||
|
||||
# Process symlinks and special files (normally skipped)
|
||||
ntu --special /path/to/files
|
||||
ntu -r --special /path/to/files
|
||||
|
||||
# Increase verbosity
|
||||
ntu -v /path/to/files
|
||||
ntu -r -v /path/to/files
|
||||
|
||||
# Also rename the root directory
|
||||
ntu --modify-root /path/to/files
|
||||
ntu -r --modify-root /path/to/files
|
||||
|
||||
# Combine options
|
||||
ntu --dry-run -v --special /path/to/files
|
||||
ntu --dry-run -r -v --special /path/to/files
|
||||
|
||||
```
|
||||
|
||||
|
|
@ -136,30 +154,36 @@ ntu --dry-run -v --special /path/to/files
|
|||
## Verwendung
|
||||
|
||||
```bash
|
||||
# Grundlegende Verwendung
|
||||
# Grundlegende Verwendung (nicht-rekursiv: nur direkte Kinder)
|
||||
ntu /pfad/zu/dateien
|
||||
|
||||
# Rekursive Verarbeitung (Unterverzeichnisse verarbeiten)
|
||||
ntu -r /pfad/zu/dateien
|
||||
|
||||
# Dry-run: Nur Vorschau der Änderungen ohne tatsächliche Umbenennung
|
||||
ntu --dry-run /pfad/zu/dateien
|
||||
ntu -n /pfad/zu/dateien # Kurzform
|
||||
ntu --dry-run -r /pfad/zu/dateien
|
||||
ntu -n -r /pfad/zu/dateien # Kurzform
|
||||
|
||||
# Spezifische Config-Datei verwenden
|
||||
ntu --conf /pfad/zu/custom.toml /pfad/zu/dateien
|
||||
|
||||
# Mehrere Pfade verarbeiten
|
||||
ntu /pfad1 /pfad2 /pfad3
|
||||
ntu -r /pfad1 /pfad2 /pfad3
|
||||
|
||||
# Bestimmte Dateien ausschließen
|
||||
ntu -e "*.tmp" -e "backup_*" /pfad/zu/dateien
|
||||
ntu -r -e "*.tmp" -e "backup_*" /pfad/zu/dateien
|
||||
|
||||
# Symlinks und Special Files verarbeiten (normalerweise übersprungen)
|
||||
ntu --special /pfad/zu/dateien
|
||||
ntu -r --special /pfad/zu/dateien
|
||||
|
||||
# Verbosity erhöhen
|
||||
ntu -v /pfad/zu/dateien
|
||||
ntu -r -v /pfad/zu/dateien
|
||||
|
||||
# Auch das Wurzelverzeichnis umbenennen
|
||||
ntu --modify-root /pfad/zu/dateien
|
||||
ntu -r --modify-root /pfad/zu/dateien
|
||||
|
||||
# Optionen kombinieren
|
||||
ntu --dry-run -v --special /pfad/zu/dateien
|
||||
ntu --dry-run -r -v --special /pfad/zu/dateien
|
||||
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue