jhnc / findimagedupes

Finds visually similar or duplicate images
GNU General Public License v3.0
104 stars 8 forks source link

suggest print out each filename in different line #6

Closed zerobikappa closed 4 years ago

zerobikappa commented 4 years ago

After find out duplicate images, I would like to use image viewer(such as phototonic) to manage them, for example:

findimagedupes -R ~/picture | xargs phototonic

If the filenames have whitespace, I can use xargs -d '\n' to separate the filenames. However, findimagedupes prints out the duplicate images in the same line: 1.jpg 1-1.jpg 2.jpg 2-1.jpg that make it difficult to separate the filenames if the filenames have whitespace.

If print out the each filenames in different lines: 1.jpg 1-1.jpg 2.jpg 2-1.jpg

I can easily separate the filenames and pass to pipeline: findimagedupes -R ~/picture | xargs -d '\n' phototonic

PS: I tried to used -p option( findimagedupes -R ~/picture -p `which phototonic` ), but it does not work.

jhnc commented 4 years ago

Option parsing stops after a file/directory is seen. Use:

findimagedupes -R -p `which phototonic` -- ~/picture

You could also do: findimagedupes -R -i 'VIEW()(phototonic "$@")' -- ~/picture

Or try findimagedupes -R -i '# some code' -s script -- ~/picture and then examine script