Discussion:
[darktable-user] LUA script with DT for Windows
Jean-Jacques MONOT
2018-02-27 22:15:34 UTC
Permalink
Hello,

I am trying to use LUA scripting with DT for windows.... I have done all
what should be necessary to get LuaS scripting, using some variants

But , nothing seems to work : what am I missing ? is DT for Windows
compatible with LUA ?

See my posts in French explaining the problem
https://darktable.fr/forum/showthread.php?tid=2409&pid=21559#pid21559

JJ Monot

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Tobias Ellinghaus
2018-02-28 09:51:50 UTC
Permalink
Post by Jean-Jacques MONOT
Hello,
I am trying to use LUA scripting with DT for windows.... I have done all
what should be necessary to get LuaS scripting, using some variants
But , nothing seems to work : what am I missing ? is DT for Windows
compatible with LUA ?
There are some limitations in Lua itself, but in general it should work. What
doesn't work is executing Lua scripts with any non-ASCII character in it's
path or file name. That implies that the luarc file won't be executed if your
user name has any such character in it. From your screen shots I see that this
isn't the case.
The first thing you should try is updating to version 2.4.1. I am not sure if
it will help in your case, but given that Windows is still a new target for
darktable you can expect some bugfixes.

Now, in order to see the output generated by "-d lua" you have to look into
the log file written by darktable:
https://www.darktable.org/about/faq/#faq-windows-logs

Last but not least, please try using a / instead of a \ in the luarc as the
path separator. I don't expect that to fix your problem, but it's worth a try.
Post by Jean-Jacques MONOT
See my posts in French explaining the problem
https://darktable.fr/forum/showthread.php?tid=2409&pid=21559#pid21559
JJ Monot
Tobias
Jean-Jacques MONOT
2018-02-28 11:13:39 UTC
Permalink
It is OK now ... I was mislead by the "hello_wolrd" short display : i was
waiting for a static display, and it is a toat

////////////////////////////
FR : Ca y est .... je me suis fait avoir par le cÎté "fugace" du
hello_world : je cherchais une information statique, alors que c'est un
"Toast" ...
////////////////////////////

In short, what is working :
- double click on DT icon
- OR command screen in the bin folder of DT :
darktable
- ou command screen in the bin folder of DT :
darktable -d lua

////////////////////////////
FR : Pour résumer, ce qui marche :
- double click sur l'icone DT
- ou lancement par invite de commande dans le répertoire bin de DT :
darktable
- ou lancement par invite de commande dans le répertoire bin de DT:
darktable -d lua
////////////////////////////

- with luarc file in
C:\Users\aaaa\AppData\Local\darktable\
- and luarc file including
require "hello_world"
- and "hello_world.lua" file in :
C:\Users\aaaa\AppData\Local\darktable\lua

////////////////////////////
FR :
- avec fichier luarc placé dans
C:\Users\aaaa\AppData\Local\darktable\
- et fichier luarc contenant:
require "hello_world"
- et fichier "hello_world.lua" placé dans :
C:\Users\aaaa\AppData\Local\darktable\lua
////////////////////////////

Toast appears during 2/3 seconds in the lower part of DT window, with same
colour (grey) ... I was looking for another thing ...

////////////////////////////
FR : Le toast apparait 2/3 secondes dans la partie basse de la fenêtre
(j'étais en plein écran), sous la forme d'un cartouche de la même couleur
(je cherchais autre chose ...)
////////////////////////////

with luarc file including reference to the "example" folder (including the
"hello_world.lua" file), it works also (no problem wiht \ or /)
require "examples/hello_world"

////////////////////////////
FR : Si on change le fichier luarc, cela fonctionne aussi et il utilise
bien l'arborescence :
require "examples/hello_world"
////////////////////////////

What i am looking for :
- a script similar to LRMogrify in Lightroom, to resize images and place a
white border of 2 pixels, using ImageMagik as image processor on the PC
- a script similar as the one placed by Photolab inside LR to make
exchanges of images between LR and PL.

If anybody has the same needs, or already developped such scripts, I lwould
like to exchange about it.

////////////////////////////
FR :Ce que je voudrais faire/avoir :
- un script comme LRMogrify pour retailler mes images en ayant la
possibilité de mettre une bordure de 2 pixels autour de l'image : si qqun a
fait ce script ou à la même besoin ....
- un script comme celui qu'intÚgre Photolab dans LR pour faire l'A/R vers
Photolab ... idem : si qqu l'a fait :-)
////////////////////////////
Post by Tobias Ellinghaus
Post by Jean-Jacques MONOT
Hello,
I am trying to use LUA scripting with DT for windows.... I have done all
what should be necessary to get LuaS scripting, using some variants
But , nothing seems to work : what am I missing ? is DT for Windows
compatible with LUA ?
There are some limitations in Lua itself, but in general it should work. What
doesn't work is executing Lua scripts with any non-ASCII character in it's
path or file name. That implies that the luarc file won't be executed if your
user name has any such character in it. From your screen shots I see that this
isn't the case.
The first thing you should try is updating to version 2.4.1. I am not sure if
it will help in your case, but given that Windows is still a new target for
darktable you can expect some bugfixes.
Now, in order to see the output generated by "-d lua" you have to look into
https://www.darktable.org/about/faq/#faq-windows-logs
Last but not least, please try using a / instead of a \ in the luarc as the
path separator. I don't expect that to fix your problem, but it's worth a try.
Post by Jean-Jacques MONOT
See my posts in French explaining the problem
https://darktable.fr/forum/showthread.php?tid=2409&pid=21559#pid21559
JJ Monot
Tobias
William Ferguson
2018-02-28 18:49:16 UTC
Permalink
On Wed, Feb 28, 2018 at 6:13 AM, Jean-Jacques MONOT <
Post by Jean-Jacques MONOT
It is OK now ... I was mislead by the "hello_wolrd" short display : i was
waiting for a static display, and it is a toat
////////////////////////////
FR : Ca y est .... je me suis fait avoir par le cÎté "fugace" du
hello_world : je cherchais une information statique, alors que c'est un
"Toast" ...
////////////////////////////
- double click on DT icon
darktable
darktable -d lua
////////////////////////////
- double click sur l'icone DT
darktable
darktable -d lua
////////////////////////////
- with luarc file in
C:\Users\aaaa\AppData\Local\darktable\
- and luarc file including
require "hello_world"
C:\Users\aaaa\AppData\Local\darktable\lua
////////////////////////////
- avec fichier luarc placé dans
C:\Users\aaaa\AppData\Local\darktable\
require "hello_world"
C:\Users\aaaa\AppData\Local\darktable\lua
////////////////////////////
Toast appears during 2/3 seconds in the lower part of DT window, with same
colour (grey) ... I was looking for another thing ...
////////////////////////////
FR : Le toast apparait 2/3 secondes dans la partie basse de la fenêtre
(j'étais en plein écran), sous la forme d'un cartouche de la même couleur
(je cherchais autre chose ...)
////////////////////////////
with luarc file including reference to the "example" folder (including the
"hello_world.lua" file), it works also (no problem wiht \ or /)
require "examples/hello_world"
////////////////////////////
FR : Si on change le fichier luarc, cela fonctionne aussi et il utilise
require "examples/hello_world"
////////////////////////////
- a script similar to LRMogrify in Lightroom, to resize images and place a
white border of 2 pixels, using ImageMagik as image processor on the PC
- a script similar as the one placed by Photolab inside LR to make
exchanges of images between LR and PL.
If anybody has the same needs, or already developped such scripts, I
lwould like to exchange about it.
////////////////////////////
- un script comme LRMogrify pour retailler mes images en ayant la
possibilité de mettre une bordure de 2 pixels autour de l'image : si qqun a
fait ce script ou à la même besoin ....
- un script comme celui qu'intÚgre Photolab dans LR pour faire l'A/R vers
Photolab ... idem : si qqu l'a fait :-)
////////////////////////////
Post by Tobias Ellinghaus
Post by Jean-Jacques MONOT
Hello,
I am trying to use LUA scripting with DT for windows.... I have done all
what should be necessary to get LuaS scripting, using some variants
But , nothing seems to work : what am I missing ? is DT for Windows
compatible with LUA ?
There are some limitations in Lua itself, but in general it should work. What
doesn't work is executing Lua scripts with any non-ASCII character in it's
path or file name. That implies that the luarc file won't be executed if your
user name has any such character in it. From your screen shots I see that this
isn't the case.
The first thing you should try is updating to version 2.4.1. I am not sure if
it will help in your case, but given that Windows is still a new target for
darktable you can expect some bugfixes.
Now, in order to see the output generated by "-d lua" you have to look into
https://www.darktable.org/about/faq/#faq-windows-logs
Last but not least, please try using a / instead of a \ in the luarc as the
path separator. I don't expect that to fix your problem, but it's worth a try.
Post by Jean-Jacques MONOT
See my posts in French explaining the problem
https://darktable.fr/forum/showthread.php?tid=2409&pid=21559#pid21559
JJ Monot
Tobias
____________________________________________________________________________
darktable user mailing list to unsubscribe send a mail to
Scripts that rely on operating system interaction, such as those that call
external executables (gimp.lua, hugin.lua, enfuse.lua, etc) do not work at
present on windows. There are also problems with them on macOS. We've
identified the problem, come up with a fix, and are currently coding and
testing it. If we don't run into any problems, then the fix should be in
place by the weekend (hopefully). Once the fix is in place, you'll have
examples of how to call an external program and return the result, so if
you are coding inclined you can write your own script to do what you need.
If you're not coding inclined, then ask on the mailing list if anyone is
interested in coding it.


Bill

Loading...