Skip to content

πŸš€ A command line bulk file renaming tool that works in concert with your favorite text editors

License

Notifications You must be signed in to change notification settings

sheepla/renedit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ renedit

A simple and efficient command line bulk file renaming tool that works in concert with your favorite text editors

Demo

Demo.webm

Features

  • Efficient batch renaming workflow: πŸ’¨ Run β†’ πŸ—’οΈEdit β†’ πŸ’Ύ Save β†’ ✨ Rename
  • Can invoke your favorite text editors to determine the name of the file to be changed. e.g. Vim, Emacs, nano, etc. (-e, --editor option or $EDITOR environment variable)
  • Fail-safe: dry-run mode by default (run by -x, --execute option)

Usage

The arguments are as follows:

Usage: renedit [OPTIONS] --editor <EDITOR> <PATH>...

Arguments:
  <PATH>...  Target directories or files

Options:
  -e, --editor <EDITOR>                    Command of text editor [env: EDITOR=nvim]
  -d, --definition-file <DEFINITION_FILE>  Path to definition file
  -x, --execute                            Execute renaming (disable DRY-RUN mode)
  -y, --yes                                Allow all rename confirmations
  -h, --help                               Print help
  1. πŸ’¨ Run: Run this command like: renedit --editor nvim path/to/files --execute
  2. πŸ—’οΈEdit: When the command is invoked, the editor is automatically launched. A text file with the path to the file will open, edit it to the name you want to change
  3. πŸ’Ύ Save: Overwrites the file and exits. For example, in Vim/Neovim, type :wq.
  4. ✨ Rename:
    • If the -x, --execute option is specified, you can batch rename to the changed name when you exit the editor. If not specified, the paths before and after the rename will be displayed.
    • When renaming, type y, yes or Enter at the confirmation prompt.
    • If you specify the -y or --yes option at startup, you can skip the confirmation and execute the renaming at once.

Installation

To build from source, clone this repository and run cargo install --path=.

License

MIT

Thanks

This tool was inspired by itchyny/mmv written in Go, Thanks!

Author

sheepla

About

πŸš€ A command line bulk file renaming tool that works in concert with your favorite text editors

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages