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
- Host: GitHub
- URL: https://github.com/sheepla/renedit
- Owner: sheepla
- License: mit
- Created: 2025-03-18T10:30:30.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-03-18T13:35:59.000Z (3 months ago)
- Last Synced: 2025-03-18T14:29:42.395Z (3 months ago)
- Topics: batch-rename, bulk-rename, cli, cli-tool, rename, rename-tool, rust, utility
- Language: Rust
- Homepage:
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 filesOptions:
-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)