dharple / detox

Tames problematic filenames
BSD 3-Clause "New" or "Revised" License
312 stars 19 forks source link

Specify character set from the command line #7

Open dharple opened 7 years ago

dharple commented 7 years ago

From Eriberto (the Debian package maintainer):

I would like to suggest two features. Something as:

-c '^~': So, detox also will change characters ^ and ~ by _. -d '^~': detox will delete the charactters if found.

This fits nicely in with my vision of v2, pushing all of the actual sequencing to the command line and away from config files and custom conversion tables.

eribertomota commented 7 years ago

Thanks!

dharple commented 3 years ago

I'm torn on this now. The rename program (from perl) already supports this, and it's what I typically use to accomplish this task. For example, the first case could be done with:

rename -n 's/[~^]/_/g' *

https://manpages.debian.org/buster/rename/rename.1.en.html

I'm still considering if/how it could be added to detox.

eribertomota commented 3 years ago

Good! Thanks!