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:
parent
ea5e2450ea
commit
0ba2057514
12 changed files with 501 additions and 52 deletions
44
man/ntu.1
44
man/ntu.1
|
|
@ -1,4 +1,4 @@
|
|||
.TH NTU 1 "2025-02-10" "NameToUnix 1.0.0" "User Commands"
|
||||
.TH NTU 1 "2025-02-10" "NameToUnix 1.1.0" "User Commands"
|
||||
.SH NAME
|
||||
ntu \- sanitize file and directory names to Unix conventions
|
||||
.SH SYNOPSIS
|
||||
|
|
@ -21,6 +21,12 @@ like .tar.gz, and handles hidden files correctly.
|
|||
.BR \-r ", " \-\-recursive
|
||||
Process directories recursively (default: only immediate children)
|
||||
.TP
|
||||
.BR \-s ", " \-\-sequence " \fINAME\fR"
|
||||
Use a specific transformation sequence. Available sequences: default, lower, upper, minimal, utf-8. Use \fB\-L\fR to list all sequences.
|
||||
.TP
|
||||
.BR \-L
|
||||
List all available transformation sequences. Use with \fB\-v\fR for detailed information.
|
||||
.TP
|
||||
.BR \-\-conf " \fIFILE\fR"
|
||||
Use a specific configuration file instead of the default hierarchy
|
||||
.TP
|
||||
|
|
@ -78,6 +84,27 @@ Replaced with underscores.
|
|||
.TP
|
||||
.B Multiple Underscores
|
||||
Consecutive underscores are collapsed to a single underscore.
|
||||
.SH SEQUENCES
|
||||
.B ntu
|
||||
supports different transformation sequences that can be selected with the \fB\-s\fR option:
|
||||
.TP
|
||||
.B default
|
||||
Standard transformation: spaces become underscores, German umlauts are converted
|
||||
to ASCII equivalents, special characters are removed or replaced.
|
||||
.TP
|
||||
.B lower
|
||||
Like default, but converts all text to lowercase.
|
||||
.TP
|
||||
.B upper
|
||||
Like default, but converts all text to UPPERCASE.
|
||||
.TP
|
||||
.B minimal
|
||||
Minimal changes: only replaces spaces with underscores, keeps umlauts and
|
||||
other UTF-8 characters.
|
||||
.TP
|
||||
.B utf-8
|
||||
UTF-8 friendly: keeps umlauts and UTF-8 characters, replaces spaces,
|
||||
removes special characters.
|
||||
.SH EXCLUDED PATTERNS
|
||||
By default, the following directories are automatically excluded:
|
||||
.PP
|
||||
|
|
@ -111,6 +138,21 @@ Process multiple directories:
|
|||
.TP
|
||||
Verbose output with no colors:
|
||||
.B ntu \-v \-\-no\-color /path/to/directory
|
||||
.TP
|
||||
Use lowercase sequence:
|
||||
.B ntu \-r \-s lower /path/to/files
|
||||
.TP
|
||||
Minimal mode (only spaces, keep UTF-8):
|
||||
.B ntu \-s minimal /path/to/files
|
||||
.TP
|
||||
UTF-8 friendly mode:
|
||||
.B ntu \-s utf-8 /path/to/files
|
||||
.TP
|
||||
List all available sequences:
|
||||
.B ntu \-L
|
||||
.TP
|
||||
List sequences with details:
|
||||
.B ntu \-L \-v
|
||||
.SH CONFIGURATION
|
||||
.B ntu
|
||||
looks for configuration files in the following locations (in order):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue