2.1.0 • Published 9 years ago

orn v2.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

Oh-Rename npm-version

If you know JavaScript RegExp, you know orn, a super simple batch renamer.

Usage

Just like String.prototype.replace(<pattern>, <replacement>) in cli, which <pattern> could be a RegExp or String, and <replacement> could be a String or Arrow Function:

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

2.1.0

9 years ago

2.0.0

9 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

11 years ago