rena

rena is a tiny fire/directory renaming command.


Keywords
cli, command, rename, nim
License
MIT
Install
nimble install rena

Documentation

rena

gh-actions nimble-version nimble-install

rena is a tiny fire/directory renaming command.

demo-replace

Overview

I hate a file name that has whitespace. Sometimes, it occurs a bug of program (Especially, shell script). Renaming is boring and takes times. So I created rena command. This will resolve this problem.

Development

Nim 1.0.6

Usage

You can do dry-run with -d or --dry-run. It means that you can check file name before real renaming with your eyes. Files or directories will be renamed if you didn't use -d options.

replace

replace sub-command runs replacing characters, --from-str to --to-str. replace replaces whitespace in default.

This code runs dry-run.

$ rena replace --dry-run -t _ target_dir

# or

$ rena replace -d -t _ target_dir

This code actually runs renaming.

$ rena replace -t _ target_dir

# '-p' prints results

$ rena replace -p -t _ target_dir

You should use the --from-strs or -f options if you want to replace multiple characters.

Examples: Replacing ( and ) to _ .

$ rena replace -f '(' -f ')' -t "_" target_dir

delete

You should use the delete sub-command if you want to delete characters. delete deletes whitespace in default.

$ rena delete target_dir

You should use -f options if you change delete target characters.

$ rena delete -f '(' -f ')' target_dir

lower

lower sub-command renames all characters to lower character.

$ rena lower target_dir

upper

upper sub-command renames all characters to upper character.

$ rena upper target_dir

Install

nimble install rena

Download binary from Release.

License

MIT