#path #pattern #regex #rename #tool #cli-tool #stdin

bin+lib rew

A text processing CLI tool that rewrites FS paths according to a pattern

3 releases (breaking)

0.3.0 Mar 29, 2021
0.2.0 Feb 14, 2021
0.1.0 Dec 9, 2020

#1485 in Text processing

MIT license

320KB
7.5K SLoC

rew

A text processing CLI tool that rewrites FS paths according to a pattern.

Build Coverage Version Dependencies Downloads License

What rew does

  1. Reads values from standard input.
  2. Rewrites them according to a pattern.
  3. Prints results to standard output.

What rew does

Input values are assumed to be FS paths, however, rew is able to process any UTF-8 encoded text.

find -iname '*.jpeg' | rew 'img_{C}.{e|l|r:e}'

Rew is also distributed with two accompanying utilities (mvb and cpb) which move/copy files and directories, based on rew output.

find -iname '*.jpeg' | rew 'img_{C}.{e|l|r:e}' -d | mvb

Documentation

License

Rew is licensed under the MIT license.

Dependencies

~8–18MB
~278K SLoC