olive-groves / butterfly_viewer

Side-by-side image viewer with synchronized zoom and sliding overlays. Drag and drop to instantly compare multiple images on your desktop. Very open source.
https://olive-groves.github.io/butterfly_viewer/
Other
22 stars 3 forks source link

[Feature] Start from command line, taking the paths of the images to compare as paramters #44

Open icue opened 3 months ago

icue commented 3 months ago

Is there an existing request for this feature?

Is your feature request related to a problem?

I'm using Windows, and my current workflow with butterfly viewer is often: locate the two images in explorer (which are often in two different folders), open butterfly viewer, switch to explorer again, drag them into butterfly viewer, and click on the "create" button in the sliding overlay creator. This is not the most efficient way to start the comparison. All these preparation work is bringing overhead and friction, especially when I have lots of pairs of images to compare.

Describe the solution you'd like

In cmd, simply with "butterfly_viewer.exe -image_a_path={path to image A} -image_b_path={path to image B}", I can open butterfly viewer, with the two images loaded already and also the sliding overlay created. I imagine up to four such arguments may be provided, as butterfly viewer can compare up to 4 images.

With this feature, combined with various automation/efficiency tools out there, one can create shortcuts to quickly start the comparison.

Describe alternatives you've considered

No response

Anything else?

No response

larsmaxfield commented 3 months ago

That would indeed be a useful feature. Thanks for the request.

I think the eventual implementation will be straightforward, but I don't have experience creating command line interfaces for Python or executables. So this may take a little while. Will keep you updated.

larsmaxfield commented 3 months ago

For my own notes (and anyone else interested), it seems the general solution will involve:

  1. Python input arguments on main call in butterfly_viewer.py
  2. PyInstaller's generated EXE accepting command line arguments
  3. Inno Setup generated setup installer carrying over those command line arguments

PyInstaller

Inno Setup