slug-cli

0.1.0 • Public • Published

slug cli: slugify for filenames

Some people don't have standards when it comes to naming files.

YOU ARE BETTER THAN THAT

slug renames files, turning nonsense into sense, like this:

slug 'Some_Client : BIG SCREEN layout.JPG'
 
# will rename the file to 
some-client-big-screen-layout.jpg

Grinding all your unruly filenames into dasherized, lowercase, lower-ascii perfection.

Got a dir full of bad filenames?

slug *

will rename the lot. It'll only go one level deep, and it'll indiscriminately rename files and directories. Use with find for more elaborate requirements

find . -name "*.JPG" -exec slug {} \;

Go forth and slug.

         ___
        /\_ \
  ____  \//\ \     __  __     __
 /',__\   \ \ \   /\ \/\ \  /'_ `\
/\__, `\   \_\ \_ \ \ \_\ \/\ \L\ \  
\/\____/   /\____\ \ \____/\ \____ \
 \/___/    \/____/  \/___/  \/___L\ \
                              /\____/
                              \_/__/

Package Sidebar

Install

npm i slug-cli

Weekly Downloads

3

Version

0.1.0

License

ISC

Last publish

Collaborators

  • olizilla