William Ferguson (2019-May-15, excerpt):
> Without knowing more specifics about what you're trying to do,
> that's the best I can come up with at the moment.
I'm trying to figure out how difficult it would be to satisfy Kneops'
request about editing more metadata fields, following the KISS
principle as I had suggested:
* Use Lua only to describe a GUI module in DT's lightroom (enter
metadata into fields) and to hand the slected images and desired
task off to any other program.
* Use `exiv2` to modify the metadata in the XMP file(s) of selected
image(s). Or `exiftool`, or whatever.
* Make DT read the XMP file(s) and update its database.
The first two points are easy, the third one is missing. This has to
be triggered from the Lua script, anything else (reimport through GUI,
or restart darktable) would be awkward and cumbersome.
I imagine this to be one possible way for darktable to cooperate with
other tools nicely, i.e., in a rather traditional Linux style, just as
I've described in my remark to Kneops' request.
Looking at Lua from a programming language perspective, it's certainly
not a language one would want to write larger applications in (there's
not enough structure in the language to enforce careful programming,
plus a bunch of decign choices rather encouraging error-prone
practices). So I'd rather use it for thin layers of glue code: I do
not want to issue SQL statements to darktable's database, in order to
replicate the changes in metadata. `exiv2` can change XMP files, and
darktable can read them. I just need to programmatically tell them to
do so. And that would probably be in Lua?
An interesting question will be how to extract metadata from images
through `exiv2`, and hand them to darktable using the means described
above. Writing a parser in Lua would certainly not qualify as glue
code any more.
Cheers
Stefan
--
http://stefan-klinger.de o/X
I prefer receiving plain text messages, not exceeding 32kB. /\/
\
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to [email protected]