https://github.com/tableflip/slug-cli
Fix bad filenames with slugify
https://github.com/tableflip/slug-cli
Last synced: about 1 year ago
JSON representation
Fix bad filenames with slugify
- Host: GitHub
- URL: https://github.com/tableflip/slug-cli
- Owner: tableflip
- License: isc
- Created: 2015-08-05T18:10:07.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-06T09:23:27.000Z (almost 11 years ago)
- Last Synced: 2025-03-15T18:53:21.524Z (over 1 year ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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:
```sh
# get slug
npm install -g slug
# use slug
slug 'Some_Client : BIG SCREEN layout.JPG'
# be slug
some-client-big-screen-layout.jpg
```
Grinding all your unruly filenames into dasherized, lowercase, lower-ascii perfection.
**Got a dir full of bad filenames?**
```sh
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
```sh
find . -name "*.JPG" -exec slug {} \;
```
Go forth and `slug`.
```
___
/\_ \
____ \//\ \ __ __ __
/',__\ \ \ \ /\ \/\ \ /'_ `\
/\__, `\ \_\ \_ \ \ \_\ \/\ \L\ \
\/\____/ /\____\ \ \____/\ \____ \
\/___/ \/____/ \/___/ \/___L\ \
/\____/
\_/__/
```