tableflip/slug-cli

Name: slug-cli

Owner: TABLEFLIP

Description: Fix bad filenames with slugify

Created: 2015-08-05 18:10:07.0

Updated: 2016-07-04 07:07:46.0

Pushed: 2015-08-06 09:23:27.0

Homepage: null

Size: 128

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

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:

t slug
install -g slug

e slug
 'Some_Client : BIG SCREEN layout.JPG'

 slug
-client-big-screen-layout.jpg

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

Got a dir full of bad filenames?

 *

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

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

Go forth and slug.

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

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.