enfuse_pro plugin - cross-platform compatible

plug-in
enfuse
hugin

(Kevin E) #1

All,

Building on what I did with my recent HDRMerge plugin for darktable I have reworked Holger Klemm’s marvelous enfuse_pro script. The rework was primarily to add cross-platform compatibility. I believe this should work on Windows and Linux. I have received no feedback on MacOS, but it SHOULD work on that as well.

If you have tried my HDRMerge plugin then you will be familiar with the setup for this. Simply open setttings>lua option and point to the binaries for the 3 required programs. A restart may be required.

While I was at it I made significant clean-up and restructuring of the code, so some functionality may have broke. Please let me know. As of right now I am aware that:
-Language Translations won’t work
-The reset button doesn’t do anything

I also added some features I developed for my HDRMerge plguin:
-Apply style on auto-import
-Copy dt tags on auto-import
-Add new tags on auto-import
and
-Bypass the output file path chooser via the “import at source image location” option

I loved using the original version of this plugin when I was running on linux, and sorely missed it when I had to switch over to windows. Hopefully many more people can have access to a great plugin now!

Find it here:


(Sergei Rybalko) #2

Excellent! I will try on Linux later and will report
Thank you for your efforts


(weyland) #3

Hi Kevin,
I’m not yet ready to use enfuse_pro, but I had a look at your code about the command path on windows.
I’m still struggling making it work when the executable path contains a space (much common on windows :-)).
Even with your code the access to c:\Program Files (x86)\Exiftool\Exiftool.exe is still giving this error:
'C:\Program' is not recognized as an internal or external command ...
Does that work for you, with such a path ?
Thanks
Windows 10 + darktable 2.4.1


(Kevin E) #4

That does work for me. I am a bit confused, are you experiencing this issue with the new enfuse_pro_2 plugin, or somewhere else? Are you working on your own code for other purposes?

I finally determined that to be able to pass execute commands with spaces the binary location needs to be quoted “path with spaces/to/bin.exe” and then any arguments that follow CANNOT have quotes. So:

cmd1 = “C:\Program Files\Hugin\bin\exiftool.exe” -TagsFromFile C:\Users\Kevin\Desktop\HDRMergeTest_MG_1705.CR2 -exif:all --subifd:all -overwrite_original C:\Users\Kevin\Desktop\HDRMergeTest_MG_1704-1708.tif

cmd2 = “C:\Program Files\Hugin\bin\exiftool.exe” -TagsFromFile “C:\Users\Kevin\Desktop\HDRMergeTest_MG_1705.CR2” -exif:all --subifd:all -overwrite_original “C:\Users\Kevin\Desktop\HDRMergeTest_MG_1704-1708.tif”

cmd1 would work, cmd2 wouldn’t (notice the " " around the source file path and the output file path in cmd2). Putting quotes around the paths found in arguments seems to be a common practice, but I couldn’t get it to work doing that. So I removed the quotes from the argument part of a command and that resolved the issue.

This has held true for me with:
HDRMerge
enfuse
align_image_stack
exiftool

All of which I have installed to: C:\Program Files…


(weyland) #5

Sorry for bringing confusion. I’ve issues with my own code, not yours (I’ve just tried to compare).
But, you confirm exactly what I’ve found:

As I cannot remove all quotes on exiftool arguments (-sep ", ", …), the only way I’ve found is to place Exiftool,exe in path without space.
Thank you for your quick answer !


(Sergei Rybalko) #6

I am testing your plugin. What should I need to select as binaries if all three of them are available system wide? Should I indicate exact location of executable? Or there is some default locations without path?


(Kevin E) #7

The exactly locations, please


(David LaCivita) #8

I hate to admit it but I have no idea where exiftool, enfuse or align image stack live on my machine. I would guess they were installed with Hugin but I can’t figure out where it all went. (Mostly a noob here). Running Ubuntu 17.10 and would have install via ppa.


(Mica) #9

@David_LaCivita open a terminal and type which enfuse. It’ll tell you the path.


(David LaCivita) #10

Got it, thanks.


(David LaCivita) #11

EDIT: Never mind, for some reason it can’t work with files from my remote hard drive. Worked fine with files from my local HD.


(Kevin E) #12

Interesting. I’ll have to ply around with that. I actually keep all my raw files in an external drive setup, but I believe I copied a few to a local folder for the purposes of testing.

It will be a while before I can devote any more time to this though, I’m currently moving.


#13

Hi, I’ve tried your plugin as well (linux) and it works fine, nice job!

The only problem I had was because I have folders with spaces in the name and the script doesn’t escape or quote paths. I’ve modified the script in order to quote the paths, would you like a pull request?


(Kevin E) #14

Hmmm, I’ll have to quote the paths differently then for Linux vs Windows. The script breaks on windows if I attempt to quote paths.

I’ll create an issue to cover this on Git, thanks for the feedback!