Skip to content
/ rena Public

rena is a tiny fire/directory renaming command.

License

Notifications You must be signed in to change notification settings

jiro4989/rena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rena

gh-actions nimble-version nimble-install

rena is a tiny file/directory renaming command.

demo-replace

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.

Nim 1.0.6

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 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

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 sub-command renames all characters to lower character.

$ rena lower target_dir

upper sub-command renames all characters to upper character.

$ rena upper target_dir
nimble install rena

Download binary from Release.

MIT

About

rena is a tiny fire/directory renaming command.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages