Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcauley-penney/mmv-c
Interactively rename files with your favorite editor
https://github.com/mcauley-penney/mmv-c
Last synced: about 2 months ago
JSON representation
Interactively rename files with your favorite editor
- Host: GitHub
- URL: https://github.com/mcauley-penney/mmv-c
- Owner: mcauley-penney
- License: mit
- Created: 2022-02-21T00:09:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-14T03:58:00.000Z (6 months ago)
- Last Synced: 2024-01-27T10:36:11.211Z (5 months ago)
- Language: C
- Homepage:
- Size: 153 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- cli-apps - mmv-c - Interactively rename files with your favorite editor. (<a name="file-renamer"></a>File renamers)
- awesome-cli-apps - mmv-c - Interactively rename files with your favorite editor. (<a name="file-renamer"></a>File renamers)
README
# mmv-c 📦
![Build](https://github.com/mcauley-penney/mmv-c/actions/workflows/build.yml/badge.svg)
Edit file and directory names in `$EDITOR`. Inspired by [itchyny/mmv](https://github.com/itchyny/mmv).
## usage
mmv behaves like other commandline tools: it accepts a list of arguments, including patterns like wildcards. See `man mmv` for options.
## example
![mmv](https://github.com/mcauley-penney/mmv-c/assets/59481467/ecf97305-7847-4878-9ee7-5a86a287634e)
In the above example, mmv is provided the `verbose` argument so that it will list what renames it conducts and three wildcard arguments that are duplicates of each other:
1. the set of files in the current directory that begin with `test`
2. the same set of files as before
3. the same set of files again, except using an alternate path stringmmv is capable of removing duplicate arguments even when the input strings don't match, for example `test0.txt` and `~/test_dir/test0.txt`. In the editing buffer, we see only one instance of each unique file, though three were given for each. When cycles between renames are detected, for example renaming `test0.txt` to `test1.txt` even though that destination already exists, mmv will remove the cycles by conducting intermediate renames on only those files which are detected as cycles, i.e. it avoids renaming everything when a cycle is detected. These intermediate rename operations are visible in the verbose output. cat is used here to display that the contents of the files remains the same.
## installation
1. Clone this repository and enter the repo directory
2. Issue `make`, then `sudo make install`
3. Feel free to remove the cloned repoIn all:
```
$ git clone https://github.com/mcauley-penney/mmv-c.git
$ cd mmv-c
$ make
$ sudo make install
$ cd ..
$ sudo rm -r mmv-c
```## credit
[itchyny/mmv](https://github.com/itchyny/mmv)
[Glenn Fowler, Landon Curt Noll, and Kiem-Phong Vo](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function)
[Mike Parker, David MacKenzie, Jim Meyering, and all of the contributors to coreutils/mv](https://github.com/coreutils/coreutils/blob/master/src/mv.c)