FuzzyIdeas / Clop

Clipboard optimizer for macOS
https://lowtechguys.com/clop
GNU General Public License v3.0
722 stars 26 forks source link

How to use with CLI? #35

Closed Hugo-Persson closed 2 months ago

Hugo-Persson commented 2 months ago

Hi!

Is it possible to run Clop with CLI options? Or is it possible to bulk format files with regex pattern?

alin23 commented 2 months ago

Sure! Install the Clop CLI from the menu bar icon of Clop then in the terminal run clop --help to see what it can do.

To optimise multiple images with a pattern you can use shell expansion like so:

clop optimise *.png

If you want more complex matching you can use the fd tool to find files based on regex and act on them with clop.

Something like:

brew install fd
fd img\d+\.png -x clop optimise
Hugo-Persson commented 2 months ago

Alright, thank you so much! Did not see the option in the menu bar