Why overengineer this, just dump IPTC info into JSON and use that for
freestyle attributes. Sqlite even has an extension for fast parsing of that
https://sqlite.org/json1.html

William Ferguson <[email protected]> schrieb am Do., 16. Mai 2019, 04:38:

>
>
> On Wed, May 15, 2019 at 5:50 PM <[email protected]> wrote:
>
>> 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.
>>
>
> This is the problem.  Darktable doesn't know what to do with the extra
> metadata in the xmp, so all it's going to do is ignore the extra metadata
> (best case), or ignore the xmp because it thinks it's corrupted (worst
> case)..  In order for darktable to use it, someone is going to have to add
> all the database tables and supporting code to store, retrieve, and use the
> information.  Then the exporter needs modified to embed the additional data
> in the exported file.
>
> I just did a quick look at the IPTC tags.  Some of the records are fixed
> format with certain data in specified columns.  Some records are use codes
> to mean different things.  Each of the coded fields would require a table
> in the database for lookup, plus tables to contain the records.  This isn't
> trivial to implement.  It's probably not too difficult, but it's a lot of
> work.
>
>
>> 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]
>>
>>
> ____________________________________________________________________________
> darktable user mailing list to unsubscribe send a mail to
> [email protected]
>

____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to [email protected]

Reply via email to