slug-cli

Fix bad filenames with slugify

Usage no npm install needed!

<script type="module">
  import slugCli from 'https://cdn.skypack.dev/slug-cli';
</script>

README

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\ \
                              /\____/
                              \_/__/