Categorygithub.com/nilsocket/svach
repositorypackage
0.0.2
Repository: https://github.com/nilsocket/svach.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

svach

Sanitize file name

Library

Documentation

CMD - Installation

go get github.com/nilsocket/svach/cmd/svach

CMD - Usage

svach            # print intended file name changes (Clean)
svach -r         # print intended file name changes recursively (Clean)

svach -c         # change intended file names (Clean)
svach -c -r      # change intended file names recursively (Clean)

svach -n         # print intended file name changes (Name)
svach -c -n -r   # change intended file names recursively (Name)

Difference between Name and Clean

Name

Creates a valid file name for all operating systems.

❯ svach -n 'Hello___World!!!!!/\\'
Hello___World!!!!!

Clean

Creates a valid file name and removes all control characters, repeated separators (_, -. +, \, !, ). Different kinds of space are replaced with normal space character.

❯ svach 'Hello___World!!!!!/\\'
Hello_World!