Closed anuragkothari closed 5 years ago
Hi @anuragkothari, these patterns are passed directly to https://github.com/isaacs/node-glob. I'm not sure but I think it may be that they represent invalid glob patterns.
Hi @JamieMason,
Thanks a lot for your response and time.
Please excuse my ignorance of git and software development in general, here are few questions I have:
Just in case someone runs into the same issue here is a workaround (conjured and adapted from multiple google searches) I have used for the time being (involves renaming files and replacing parenthesis with some other characters which are not used in the file names and then replacing those characters back to parenthesis):
Replace "(" by "="
find . -depth -name '*(*.png' -execdir bash -c 'mv -- "$1" "${1//(/=}"' bash {} \;
Replace ")" by "#"
find . -depth -name '*)*.png' -execdir bash -c 'mv -- "$1" "${1//)/#}"' bash {} \;
Use imageoptim
find . -type f -name "*.png" -execdir imageoptim {} \;
Replace "=" by "("
find . -depth -name '*=*.png' -execdir bash -c 'mv -- "$1" "${1//=/(}"' bash {} \;
Replace "#" by ")"
find . -depth -name '*#*.png' -execdir bash -c 'mv -- "$1" "${1//#/)}"' bash {} \;
Thanks a lot for your time once again.
Regards -Anurag
I'm sorry @anuragkothari I honestly don't know, you would need to maybe ask the https://github.com/isaacs/node-glob project to find an answer to this.
imageoptim-cli: 2.0.3 imageOptim: 1.8.1 OS Version: macOS Mojave 10.14.1
imageoptim cli is not able handle / find file with parentheses in the name. This is very easily reproducible. I tried using both "" for the filenames as well as escaping them with back slash. The files are handled properly via the imageoptim GUI.
Not sure if I am missing something here?