laren
![Travis CI Build Status](https://img.shields.io/travis/devmetal/laren/master.svg)
Command line tool for renaming files with custom function expression
Install
- Install:
npm install --global laren
- Executable:
laren
Usage
laren <pattern> [function] <options>
[pattern]
This is a glob pattern.
[function]
The function parameter take 2 argument, filename and the index. You can write any function that you want.
In the current version, the function is an optional argument. If any function provided by args, that will be used in files.
If you don't give the function you have to type in terminal with an :exit (see example below).
Options
-t --test
Run script in test mode. No modify the files but print out the matches and names. If you run the command without this switch,
the files will be renamed.
Usage example
laren -t ./**/* "(f, i) => 'file' + i"
./filea ==> file0
./fileb ==> file1
./filec ==> file2
Tests done!
laren -t ./**/*
(f,i) => 'file' + i;
:exit
./filea ==> file0
./fileb ==> file1
./filec ==> file2
Tests done!
History
Discover the release history by heading on over to the releases page.
Backers
Maintainers
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
License
Unless stated otherwise all works are:
and licensed under: