75lb / renamer

Rename files in bulk.
MIT License
529 stars 30 forks source link

using renamer programmatically #25

Closed sag1v closed 7 years ago

sag1v commented 7 years ago

Is there any way to use this tool programmatically in node.js? for example:

var renamer = require('renamer');
renamer('this', 'that', '*.js');
75lb commented 7 years ago

hi @sag1v..

The programmatic API needs completely rewriting to make it easier to use. This will happen in a future version, but until then you could step through cli.js and learn how it uses the API. I don't officially support this usage so take care, don't process your real files until 100% confident with the API.