enfuse_pro plugin - cross-platform compatible


(Kevin E) #1


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
-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:

[Play Raw] Luminosity masks
(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 ?
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:

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.


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!

(Andreas Schneider) #15

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

(Kevin E) #16

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

(Hevii Guy) #17

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.

(Mica) #18

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: https://github.com/BzKevin/enfuse_pro_2-dt-plugin/blob/f142775a4360a00e9aed8d08079a842d9343c454/enfuse_pro_2.lua#L790

(Hevii Guy) #19

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

(Hevii Guy) #20

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!