update rnr

This commit is contained in:
JMARyA 2025-05-19 15:40:41 +02:00
parent 1bef285a76
commit a0179e824e

View file

@ -1,20 +1,101 @@
--- ---
obj: application obj: application
repo: https://github.com/ismaelgv/rnr repo: https://github.com/ismaelgv/rnr
rev: 2025-05-19
--- ---
# rnr # rnr
[Repo](https://github.com/ismaelgv/rnr) RnR is a command-line tool to rename multiple files and directories that supports regular expressions.
**RnR** is a command-line tool to **securely rename** multiple files and directories that supports regular expressions.
## Usage ## Usage
Flags Usage: `rnr <COMMAND>`
```shell
-n, --dry-run Only show what would be done (default mode) Commands:
-f, --force Make actual changes to files - `regex`: Rename files and directories using a regular expression
-x, --hidden Include hidden files and directories - `from-file`: Read operations from a dump file
-D, --include-dirs Rename matching directories - `to-ascii`: Replace file name UTF-8 chars with ASCII chars representation
-r, --recursive Recursive mode
-s, --silent Do not print any information ### regex
--no-dump Do not dump operations into a file ```
Rename files and directories using a regular expression
Usage: rnr regex [OPTIONS] <EXPRESSION> <REPLACEMENT> <PATH(S)>...
Arguments:
<EXPRESSION> Expression to match (can be a regex)
<REPLACEMENT> Expression replacement (use single quotes for capture groups)
<PATH(S)>... Target paths
Options:
-n, --dry-run
Only show what would be done (default mode)
-f, --force
Make actual changes to files
-b, --backup
Generate file backups before renaming
-s, --silent
Do not print any information
--color <COLOR>
Set color output mode [default: auto] [possible values: always, never, auto]
--dump
Force dumping operations into a file even in dry-run mode
--dump-prefix <DUMP_PREFIX>
Set the dump file prefix [default: rnr-]
--no-dump
Do not dump operations into a file
-l, --replace-limit <LIMIT>
Limit of replacements, all matches if set to 0
-t, --replace-transform <REPLACE_TRANSFORM>
Apply a transformation to replacements including captured groups [possible values: upper, lower, ascii]
-D, --include-dirs
Rename matching directories
-r, --recursive
Recursive mode
-d, --max-depth <LEVEL>
Set max depth in recursive mode
-x, --hidden
Include hidden files and directories
```
### from-file
```
Read operations from a dump file
Usage: rnr from-file [OPTIONS] <DUMPFILE>
Arguments:
<DUMPFILE>
Options:
-n, --dry-run Only show what would be done (default mode)
-f, --force Make actual changes to files
-b, --backup Generate file backups before renaming
-s, --silent Do not print any information
--color <COLOR> Set color output mode [default: auto] [possible values: always, never, auto]
--dump Force dumping operations into a file even in dry-run mode
--dump-prefix <DUMP_PREFIX> Set the dump file prefix [default: rnr-]
--no-dump Do not dump operations into a file
-u, --undo Undo the operations from the dump file
```
### to-ascii
```
Usage: rnr to-ascii [OPTIONS] <PATH(S)>...
Arguments:
<PATH(S)>... Target paths
Options:
-n, --dry-run Only show what would be done (default mode)
-f, --force Make actual changes to files
-b, --backup Generate file backups before renaming
-s, --silent Do not print any information
--color <COLOR> Set color output mode [default: auto] [possible values: always, never, auto]
--dump Force dumping operations into a file even in dry-run mode
--dump-prefix <DUMP_PREFIX> Set the dump file prefix [default: rnr-]
--no-dump Do not dump operations into a file
-D, --include-dirs Rename matching directories
-r, --recursive Recursive mode
-d, --max-depth <LEVEL> Set max depth in recursive mode
-x, --hidden Include hidden files and directories
``` ```