docs: Version 1.2.1, Dokumentation und Man-Page aktualisieren
- Versionsnummer auf 1.2.1 hochgesetzt - Man-Page: NO_COLOR Umgebungsvariable dokumentiert (ENVIRONMENT-Abschnitt) - Man-Page: Konfigurationsreihenfolge mit Prioritäten korrigiert - Man-Page: --no-color Beschreibung um NO_COLOR-Referenz ergänzt - README: Hilfe-Ausgabe aktualisiert (fehlende Optionen: -r, --max-depth, -s, -L, --conf, --no-color) - README: NO_COLOR Hinweis in deutsch und englisch ergänzt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a72dae1a60
commit
92a3d66645
4 changed files with 57 additions and 32 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -4,7 +4,7 @@ version = 4
|
|||
|
||||
[[package]]
|
||||
name = "NameToUnix"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert_cmd",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "NameToUnix"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
edition = "2021"
|
||||
authors = ["Dieter Schlüter <dschlueter@kitux.de>"]
|
||||
description = "Ein Tool zum Anpassen von Verzeichnis- und Dateinamen an Linux-Konventionen"
|
||||
|
|
|
|||
58
README.md
58
README.md
|
|
@ -338,21 +338,28 @@ Ein Tool zum Anpassen von Verzeichnis- und Dateinamen an Linux-Konventionen
|
|||
Usage: ntu [OPTIONS] [PATHS]...
|
||||
|
||||
Arguments:
|
||||
[PATHS]... Pfade (Dateien und Verzeichnisse) zum rekursiven Anpassen
|
||||
[PATHS]... Pfade (Dateien und Verzeichnisse) zum rekursiven Anpassen
|
||||
|
||||
Options:
|
||||
-q, --quiet Ausgaben unterdrücken (keine Umbenennungsinfos auf stdout)
|
||||
-n, --dry-run Nur anzeigen, aber keine realen Änderungen vornehmen (dry-run)
|
||||
-f, --force Existierende Dateien überschreiben
|
||||
-e, --exclude <PATTERN> Zu ignorierende Muster (-e "*.py", mehrere können angegeben werden)
|
||||
-v, --verbose Ausführliche Debug-Informationen
|
||||
--modify-root Erlaubt, auch das Wurzelverzeichnis anzupassen
|
||||
--special Auch symbolische Links und Special Files verarbeiten
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
|
||||
--conf <FILE> Explizite Konfigurationsdatei (bypassed Standard-Hierarchie)
|
||||
-r, --recursive Rekursive Verarbeitung von Unterverzeichnissen aktivieren
|
||||
--max-depth <N> Maximale Rekursionstiefe (erfordert --recursive)
|
||||
-s, --sequence <NAME> Wählt eine Transformations-Sequenz aus (default, lower, upper, minimal, utf-8)
|
||||
-L Listet alle verfügbaren Sequences auf
|
||||
-q, --quiet Ausgaben unterdrücken (keine Umbenennungsinfos auf stdout)
|
||||
-n, --dry-run Nur anzeigen, aber keine realen Änderungen vornehmen (dry-run)
|
||||
-f, --force Existierende Dateien überschreiben
|
||||
-e, --exclude <PATTERN> Zu ignorierende Muster (-e "*.py", mehrere können angegeben werden)
|
||||
-v, --verbose Ausführliche Debug-Informationen
|
||||
--modify-root Erlaubt, auch das Wurzelverzeichnis anzupassen
|
||||
--special Auch symbolische Links und Special Files verarbeiten
|
||||
--no-color Deaktiviert farbige Ausgabe
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
```
|
||||
|
||||
Farbige Ausgabe kann auch über die Umgebungsvariable `NO_COLOR` deaktiviert werden (siehe https://no-color.org/).
|
||||
|
||||
### Usage of NameToUnix
|
||||
|
||||
```text
|
||||
|
|
@ -361,21 +368,28 @@ A tool for adapting directories and file names to Linux conventions
|
|||
Usage: ntu [OPTIONS] [PATHS]...
|
||||
|
||||
Arguments:
|
||||
[PATHS]... Paths (files and directories) for recursive customization
|
||||
[PATHS]... Paths (files and directories) for recursive customization
|
||||
|
||||
Options:
|
||||
-q, --quiet Suppress output (no renaming info on stdout)
|
||||
-n, --dry-run Only display, but do not make any real changes (dry-run)
|
||||
-f, --force Overwrite existing files
|
||||
-e, --exclude <PATTERN> Patterns to be ignored (-e "*.py", several can be specified)
|
||||
-v, --verbose Detailed debug information
|
||||
--modify-root Allows you to customize the root directory as well
|
||||
--special Also process symbolic links and special files
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
|
||||
--conf <FILE> Explicit config file (bypasses default hierarchy)
|
||||
-r, --recursive Enable recursive processing of subdirectories
|
||||
--max-depth <N> Maximum recursion depth (requires --recursive)
|
||||
-s, --sequence <NAME> Select a transformation sequence (default, lower, upper, minimal, utf-8)
|
||||
-L List all available sequences
|
||||
-q, --quiet Suppress output (no renaming info on stdout)
|
||||
-n, --dry-run Only display, but do not make any real changes (dry-run)
|
||||
-f, --force Overwrite existing files
|
||||
-e, --exclude <PATTERN> Patterns to be ignored (-e "*.py", several can be specified)
|
||||
-v, --verbose Detailed debug information
|
||||
--modify-root Allows you to customize the root directory as well
|
||||
--special Also process symbolic links and special files
|
||||
--no-color Disable colored output
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
```
|
||||
|
||||
Colored output can also be disabled via the `NO_COLOR` environment variable (see https://no-color.org/).
|
||||
|
||||
## Test
|
||||
|
||||
Im Verzeichnis [***./test***](./test) gibt es ein bash-Skript [***create_test_tree.sh***](test/create_test_tree.sh), das lokal 21 Test-Verzeichnisse und 400 Dateien mit skurrilen Zufallsnamen erzeugt. Damit kannst Du ***NameToUnix*** ausprobieren:
|
||||
|
|
|
|||
27
man/ntu.1
27
man/ntu.1
|
|
@ -1,4 +1,4 @@
|
|||
.TH NTU 1 "2025-02-12" "NameToUnix 1.2.0" "User Commands"
|
||||
.TH NTU 1 "2026-02-13" "NameToUnix 1.2.1" "User Commands"
|
||||
.SH NAME
|
||||
ntu \- sanitize file and directory names to Unix conventions
|
||||
.SH SYNOPSIS
|
||||
|
|
@ -55,7 +55,8 @@ Allow renaming of the root directory itself (normally skipped)
|
|||
Process symbolic links and special files (normally skipped)
|
||||
.TP
|
||||
.BR \-\-no\-color
|
||||
Disable colored output
|
||||
Disable colored output. The \fBNO_COLOR\fR environment variable is also
|
||||
respected (see \fIhttps://no-color.org/\fR).
|
||||
.TP
|
||||
.BR \-h ", " \-\-help
|
||||
Print help information
|
||||
|
|
@ -180,18 +181,28 @@ Symlinks are still not followed (targets remain unchanged)
|
|||
Safe: only the link itself is renamed, not what it points to
|
||||
.SH CONFIGURATION
|
||||
.B ntu
|
||||
looks for configuration files in the following locations (in order):
|
||||
looks for configuration files in the following locations. Later files
|
||||
override earlier ones (highest priority last):
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
./.NameToUnix.conf
|
||||
~/.config/NameToUnix/config.toml
|
||||
/etc/NameToUnix/config.toml
|
||||
1. /etc/NameToUnix/config.toml (system-wide, lowest priority)
|
||||
2. ~/.config/NameToUnix/config.toml (user-specific)
|
||||
3. ./.NameToUnix.conf (working directory, highest priority)
|
||||
.RE
|
||||
.fi
|
||||
.PP
|
||||
Configuration files can customize character replacements and other behavior.
|
||||
See the project documentation for configuration file format.
|
||||
When using \fB\-\-conf\fR, the standard hierarchy is bypassed and only the
|
||||
specified file is loaded.
|
||||
.PP
|
||||
Configuration files use TOML format with a \fB[replacements]\fR section
|
||||
for custom character replacements. See the project documentation for details.
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B NO_COLOR
|
||||
When set (to any value), colored output is disabled. This follows the
|
||||
convention described at \fIhttps://no-color.org/\fR. The \fB\-\-no\-color\fR
|
||||
flag has the same effect.
|
||||
.SH EXIT STATUS
|
||||
.TP
|
||||
.B 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue