0.0.6 • Published 9 years ago
node-orn v0.0.6
orn
If you know JavaScript RegExp, you know orn
, a file renamer
just like String.prototype.replace(<pattern>, <replacement>)
in cli.
Usage
Usage: orn <pattern> <replacement> [-d]
Arguments:
<pattern> The pattern to be replaced, could be a String or RegExp.
<replacement> The String to be replace with, Arrow Function is supported.
Options:
-h, --help Output usage information
-v, --version Output the version number
-d, --dry-run Show how the files will be renamed, but actually do nothing
Examples:
orn 720p 1080P # Replace "720p" with "1080P".
orn /720p/i 1080P # Replace "720p" or "720P" with "1080P".
orn '/(\.js)$/i' '.min$1' -d # Add ".min" to js files, in dry-run.
orn '/\S+mp3$/' 'x=>x.toLowerCase()' # Change mp3 filename to lowercase.
Switches
-d, --dry-run
Show how the files will be renamed, but actually do nothing.
License
MIT © Amio