enfuse_pro plugin - cross-platform compatible

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:

6 Likes

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

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

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…

1 Like

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 !

1 Like

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?

The exactly locations, please

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.

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

Got it, thanks.

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.

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.

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?

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!

As darktable is using exiv2, I would suggest that you use exiv2 instead of exiftool :slight_smile:

Sorry for the delay, that is a good point though. I’ll make a note for future update to look at this.

enfuse executable definition

Please pardon the ignorance but “where” do I define the path to my enfuse installation? By the way, ‘thanks’, Mica, for making it clear how it can be found.

I assume that this must be done within the lua file since I’ve not seen anything in the darktable gui, either in lua options nor in the lighttable export option dialogue.

To me, though I am no lua expert, it looks like enfuse needs to be on your path, as it looks like the script checks for its existence, and fails if it doens’t find it: enfuse_pro_2-dt-plugin/enfuse_pro_2.lua at f142775a4360a00e9aed8d08079a842d9343c454 · BzKevin/enfuse_pro_2-dt-plugin · GitHub

Thanks, Mica. I’ve added it to my path and will now reboot…

I got further once I had added enfuse to the path but then got stuck when another dialogue box came up. I t complained that “align_image_stack” was missing and that I had to install Hugin.

Hugin had already been installed so, I then set the path for “align_image_stack” and rebooted.

No joy. The lua script still complained that “align_image_stack” is missing. Yet just like enfuse, it’s now available. I’m able to run it from the command line.

Any suggestions? No need to hurry; it’s almost 20 minutes-after-tomorrow on my side of the Pond. I’m going to bed now!