update rnr
This commit is contained in:
parent
1bef285a76
commit
a0179e824e
1 changed files with 93 additions and 12 deletions
|
@ -1,20 +1,101 @@
|
|||
---
|
||||
obj: application
|
||||
repo: https://github.com/ismaelgv/rnr
|
||||
rev: 2025-05-19
|
||||
---
|
||||
|
||||
# rnr
|
||||
[Repo](https://github.com/ismaelgv/rnr)
|
||||
**RnR** is a command-line tool to **securely rename** multiple files and directories that supports regular expressions.
|
||||
RnR is a command-line tool to rename multiple files and directories that supports regular expressions.
|
||||
|
||||
## Usage
|
||||
Flags
|
||||
```shell
|
||||
-n, --dry-run Only show what would be done (default mode)
|
||||
-f, --force Make actual changes to files
|
||||
-x, --hidden Include hidden files and directories
|
||||
-D, --include-dirs Rename matching directories
|
||||
-r, --recursive Recursive mode
|
||||
-s, --silent Do not print any information
|
||||
--no-dump Do not dump operations into a file
|
||||
```
|
||||
Usage: `rnr <COMMAND>`
|
||||
|
||||
Commands:
|
||||
- `regex`: Rename files and directories using a regular expression
|
||||
- `from-file`: Read operations from a dump file
|
||||
- `to-ascii`: Replace file name UTF-8 chars with ASCII chars representation
|
||||
|
||||
### regex
|
||||
```
|
||||
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
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue