elisemercury / Duplicate-Image-Finder

difPy - Python package for finding duplicate or similar images within folders
https://difpy.readthedocs.io
MIT License
420 stars 65 forks source link

run the CLI, how? #49

Closed GerritKuilder closed 1 year ago

GerritKuilder commented 1 year ago

Hello,

call me stupid but I try to run the cli version of this code, I can run it from a basic script: from difPy import dif search = dif("C:/Path/to/Folder/")

and this works. but if I run it as python dif.py -A "C:/Path/to/Folder_A/"

I get a no such file or directory

And yes, not very familiar with python (yet)

Kind Regards,

Gerrit Kuilder

GerritKuilder commented 1 year ago

So the script dif.py is installed but somehow not added to the path, my problem I think I can sort that out, later.

elisemercury commented 1 year ago

Hi @GerritKuilder,

I just tested it myself and the CLI implementation works fine from my end.

Did you run the command in the folder where dif.py is located? If you did not add difPy to your path variables, you need to first locate into the folder where the dif.py script is installed and then you will be able to run the CLI command successfully.

For instance: if you installed difPy via the pip installer, then you would need to locate where your Python packages are installed. For me on Windows 10 that is C:\Users\User\AppData\Local\Programs\Python\Python37\Lib\site-packages\difPy. If you cloned difPy directly from GitHub, then locate the dif.py script it in the folder where you cloned it.

Hope this helps!

All the best, Elise

GerritKuilder commented 1 year ago

Hello Elise,

Thank you, i figured out that the dif.py was indeed not i my path. But I managed to create a custom script, bases on your example and dump the json result into a file,

I was able to replace a very time consuming javascript (days) with an under a minute python script and process the result in my node app..

Thank you for this.

Next step: take a python course....

Kind Regards,

Gerit Kuilder

elisemercury commented 1 year ago

Hi Gerit,

That is great to hear - happy you found a way to make it work!

All the best and happy coding, Elise