From a0179e824ee2abe7c4b2eb8ad6cbfbd40fd0c606 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Mon, 19 May 2025 15:40:41 +0200 Subject: [PATCH] update rnr --- technology/applications/cli/rnr.md | 105 +++++++++++++++++++++++++---- 1 file changed, 93 insertions(+), 12 deletions(-) diff --git a/technology/applications/cli/rnr.md b/technology/applications/cli/rnr.md index b457b68..6b91c67 100644 --- a/technology/applications/cli/rnr.md +++ b/technology/applications/cli/rnr.md @@ -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 -``` \ No newline at end of file +Usage: `rnr ` + +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] ... + +Arguments: + Expression to match (can be a regex) + Expression replacement (use single quotes for capture groups) + ... 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 + 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 + Set the dump file prefix [default: rnr-] + --no-dump + Do not dump operations into a file + -l, --replace-limit + Limit of replacements, all matches if set to 0 + -t, --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 + 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] + +Arguments: + + +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 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 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] ... + +Arguments: + ... 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 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 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 Set max depth in recursive mode + -x, --hidden Include hidden files and directories +```