{"id":1584,"date":"2019-12-31T15:04:56","date_gmt":"2019-12-31T20:04:56","guid":{"rendered":"http:\/\/www.familytidings.com\/blog\/?p=1584"},"modified":"2019-12-31T15:04:56","modified_gmt":"2019-12-31T20:04:56","slug":"carrying-photo-metadata-from-darktable-to-piwigo","status":"publish","type":"post","link":"https:\/\/www.familytidings.com\/blog\/?p=1584","title":{"rendered":"Carrying Photo Metadata from Darktable to Piwigo"},"content":{"rendered":"\n<p>Darktable exports photo fields to metadata as follows (as reported by <code>exiv2 pr -pa {file}.jpg<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Darktable title -> Xmp.dc.title<br>Darktable description -> Xmp.dc.description<br>Darktable tagging section -> Xmp.dc:subject (as a comma-separated list)<br><\/pre>\n\n\n\n<p>Unfortunately, Piwigo does not read XMP metadata so only the description is available as <code>Exif.Image.ImageDescription<\/code>.  IPTC is required for the title and tags.  Darktable does not export IPTC, but can be scripted to copy XMP tags to IPTC.  See instructions here:  <a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/discuss.pixls.us\/t\/name-description-and-keywords-are-not-recognized-by-shutterstock\/6726\/26\">https:\/\/discuss.pixls.us\/t\/name-description-and-keywords-are-not-recognized-by-shutterstock\/6726\/26<\/a><\/p>\n\n\n\n<p>and source code here:  <a href=\"https:\/\/github.com\/chrik5\/lua-scripts\/blob\/exiftool\/contrib\/exiftool_export.lua\">https:\/\/github.com\/chrik5\/lua-scripts\/blob\/exiftool\/contrib\/exiftool_export.lua<\/a><\/p>\n\n\n\n<p>In Darktable, using  <em>exiftool on export<\/em> from above, check <em>enable exiftool<\/em>, set options to  <em>-@<\/em> and create file <code>xmp2iptc.txt<\/code> with the following contents:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-XMP-dc:Subject > IPTC:Keywords<br>-XMP-dc:Description > IPTC:Caption-Abstract<br># -XMP-dc:Title > IPTC:ObjectName<\/pre>\n\n\n\n<p>(uncomment  out the last line if you want to use the Title in Darktable rather than the filename Piwigo uses by default; and update  <code>use_iptc_mapping<\/code> array below)<br>Set this file as <em>Argumentsfile<\/em>.<br>Then export the files from Darktable.<\/p>\n\n\n\n<p>Using Piwigo plugin <em>LocalFiles Editor<\/em> add these lines to local config file <code>local\/config\/config.inc.php<\/code>:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">\/\/ use_iptc: Use IPTC data during database synchronization with files<br>\/\/ metadata<br>$conf['use_iptc'] = true;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ use_iptc_mapping : in which IPTC fields will Piwigo find image \n\/\/ information? This setting is used during metadata synchronisation. It \n\/\/ associates a piwigo_images column name to a IPTC key \n\/\/ See <a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/exiftool.org\/TagNames\/IPTC.html\">https:\/\/exiftool.org\/TagNames\/IPTC.html<\/a> \n\/\/ and <a rel=\"noreferrer noopener\" target=\"_blank\" href=\"http:\/\/piwigo.org\/doc\/doku.php?id=user_documentation:metadata&amp;s\">http:\/\/piwigo.org\/doc\/doku.php?id=user_documentation:metadata&amp;s<\/a> \n$conf['use_iptc_mapping'] = array(   \n  'keywords'        => '2#025',\n  'comment'         => '2#120'   \n  );  <\/pre>\n<\/div><\/div>\n\n\n\n<p>From this point on, you&#8217;ll only have to remember to activate <em>exiftool on export<\/em> in Darktable and Piwigo will do the rest.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Darktable exports photo fields to metadata as follows (as reported by exiv2 pr -pa {file}.jpg): Darktable title -> Xmp.dc.titleDarktable description -> Xmp.dc.descriptionDarktable tagging section -> Xmp.dc:subject (as a comma-separated list) Unfortunately, Piwigo does not read XMP metadata so only the description is available as Exif.Image.ImageDescription. IPTC is required for the title and tags. Darktable does [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1584","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1584"}],"version-history":[{"count":7,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1584\/revisions"}],"predecessor-version":[{"id":1591,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1584\/revisions\/1591"}],"wp:attachment":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}