An open API service indexing awesome lists of open source software.

https://github.com/sheepla/renedit

πŸš€ A command line bulk file renaming tool that works in concert with your favorite text editors
https://github.com/sheepla/renedit

batch-rename bulk-rename cli cli-tool rename rename-tool rust utility

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# πŸš€ renedit

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

## Demo

[Demo.webm](https://github.com/user-attachments/assets/2d89b984-bd6a-4eb0-be7a-f8365d8b5fc1)

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

Arguments:
... Target directories or files

Options:
-e, --editor Command of text editor [env: EDITOR=nvim]
-d, --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`
1. πŸ—’οΈ**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
1. πŸ’Ύ **Save**: Overwrites the file and exits. For example, in Vim/Neovim, type `:wq`.
1. ✨ **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](https://github.com/itchyny/mmv) written in Go, Thanks!

## Author

[sheepla](https://github.com/sheepla)