RenameIt
RenameIt copied to clipboard
Feature request: Add converter for kebab case and remove special characters
I'm a designer working with developers who prefer file names of exported assets in kebab case, with any special characters removed.
For example, I would like a converter that changes a file name like Bath icon (yes)@2x.png
to [email protected]
. So it would:
- lowercase everything
- replace spaces with
-
- strip any special characters like
()!@#$%^&*+=
etc.
Perhaps kebab case (items #1-2) could be one converter, and stripping special characters could be another (#3).
I can easily manipulate the text to lowercase and replace spaces with -
. Removing special characters is doable but in your example, you have the @ symbol and that would be removed too (Bath icon (yes)@2x.png to bath-icon-yes2x.png)
I think the best way would be separating them like you suggested. The first case shouldn't take me too long to do it. The second one is a bit more complicated.
Ah, good point re: @
.
I'd argue that the @
should actually be the one special character preserved since it's used for pixel density suffixes like @2x
.
Maybe a converter that removes the special characters you specify would be good?
Not sure what syntax works best for converters, but just for example, something like %*sp('%()')%
would change a file name like asset(20%)@2x.png
to [email protected]
.