<?xml version="1.0" encoding="utf-8"?>
<section id="GuideOptionsMetadata">
  <title id="titleGuideOptionsMetadata">Metadata</title>
  <para>This section describes the options for metadata writing.</para>
  <para>
    Refer also to
    <link linkend="GuideReferenceMetadata" endterm="titleGuideReferenceMetadata" />
    in the Reference section.
  </para>
  <section id="MetadataWritingProcess">
    <title id="titleMetadataWritingProcess">Metadata writing process</title>
    <para>
      When writing metadata, Geeqie will follow these steps. This process will stop when the first successful write occurs. A flowchart showing the sequence is
      <link linkend="MetadataFlowchart">here</link>
      .
      <orderedlist>
        <listitem>
          <para>
            <guilabel>Save metadata in image files or sidecar files, according to the XMP standard</guilabel>
            <para />
            If checked, Geeqie will attempt to write metadata to the file itself, or to an associated XMP sidecar file
            <para />
            The destination is dependent on the settings in the "Writable" and "Sidecar Is Allowed" columns of the
            <link linkend="Filetypes">File Filters tab</link>
            .
          </para>
        </listitem>
        <listitem>
          <para>
            <guilabel>Save metadata in '.metadata' folder, local to image folder (non-standard)</guilabel>
            <para />
            If checked, Geeqie will attempt to write to an xmp file in a local .metadata folder
          </para>
        </listitem>
        <listitem>
          <para>
            <guilabel>Save metadata in Geeqie private directory</guilabel>
            <para />
            If neither of the above are successful, Geeqie will write to an xmp file in the folder
            <programlisting>$HOME/.local/share/geeqie/metadata</programlisting>
          </para>
        </listitem>
      </orderedlist>
    </para>
    <para>When writing to local metadata folders, the directory structure duplicates that of the location of the source files.</para>
  </section>
  <section id="WriteToImageFiles">
    <title>Step 1 Options:</title>
    <para>If Step 1 above was successful, the following options take effect:</para>
    <itemizedlist>
      <listitem>
        <para>
          <guilabel>Store metadata also in legacy IPTC tags (converted according to IPTC4XMP standard)</guilabel>
          <para />
          If checked, Geeqie will write IPTC tags as defined in
          <link linkend="GuideReferenceStandards" endterm="titleGuideReferenceStandards" />
          <para />
          The conversion from XMP tag to IPTC tag is performed by exiv2. A list of the XMP-IPTC conversions is at the end of
          <ulink url="https://exiv2.org/conversion.html">this table</ulink>
          .
        </para>
      </listitem>
      <listitem>
        <para>
          <guilabel>Warn if the image files are not writeable</guilabel>
          <para />
          If checked, open a warning dialogue if the file is not writeable
        </para>
      </listitem>
      <listitem>
        <para>
          <guilabel>Ask before writing to image files</guilabel>
          <para />
          If checked, open a confirmation dialogue before writing to the file
        </para>
      </listitem>
      <listitem>
        <para>
          <guilabel>Create sidecar files named image.ext.xmp (as opposed to image.xmp)</guilabel>
          <para />
          If checked, new sidecar files will use image.ext.xmp naming scheme. This scheme is used by Darktable.
        </para>
      </listitem>
    </itemizedlist>
  </section>
  <section id="WriteToGeeqiePrivateFiles">
    <title>Steps 2 and 3 Option:</title>
    <para>If Step 2 or 3 above was successful, the following option takes effect:</para>
    <itemizedlist>
      <listitem>
        <para>
          <guilabel>Use GQview legacy metadata format (supports only keywords and comments) instead of XMP</guilabel>
          <para />
          If checked, Geeqie will write metadata in GQview legacy files (file extension .meta) format
        </para>
      </listitem>
    </itemizedlist>
  </section>
  <section id="MetadataMiscellaneous">
    <title>Miscellaneous</title>
    <itemizedlist>
      <listitem>
        <para>
          <guilabel>Write the same description tags to all grouped sidecars</guilabel>
          <para />
          If checked the same descriptive tags are written to all files in a group. File grouping is as defined in the
          <link linkend="Groupingsidecarextensions">File Filters tab</link>
          of main Preferences. Technical tags (exif) are handled separately for each file.
        </para>
        <para>The tags written are:</para>
        <programlisting xml:space="preserve">
          "Xmp.dc.title"
          "Xmp.photoshop.Urgency"
          "Xmp.photoshop.Category",
          "Xmp.photoshop.SupplementalCategory",
          "Xmp.dc.subject",
          "Xmp.iptc.Location",
          "Xmp.photoshop.Instruction",
          "Xmp.photoshop.DateCreated",
          "Xmp.dc.creator",
          "Xmp.photoshop.AuthorsPosition",
          "Xmp.photoshop.City",
          "Xmp.photoshop.State",
          "Xmp.iptc.CountryCode",
          "Xmp.photoshop.Country",
          "Xmp.photoshop.TransmissionReference",
          "Xmp.photoshop.Headline",
          "Xmp.photoshop.Credit",
          "Xmp.photoshop.Source",
          "Xmp.dc.rights",
          "Xmp.dc.description",
          "Xmp.photoshop.CaptionWriter",
        </programlisting>
        <para />
      </listitem>
      <listitem>
        <para>
          <guilabel>Allow keywords to differ only in case</guilabel>
          <para />
          If checked, permits keywords to be case-sensitive (e.g.
          <emphasis>Place</emphasis>
          and
          <emphasis>place</emphasis>
          are two different keywords)
        </para>
      </listitem>
      <listitem>
        <para>
          <guilabel>Write altered image orientation to the metadata</guilabel>
          <para />
          If checked, the results of orientation commands (Rotate, Mirror and Flip) issued on an image will be written to metadata either automatically as specified below or when manually initiated. This option also affects the
          <link linkend="Editmenu">Auto rotate image using EXIF information</link>
          menu item.
        </para>
        <warning>
          <para>If this option is not checked, the results of orientation commands will be lost when Geeqie closes.</para>
          <para>Do not change this option while you have temporary rotations applied to images.</para>
        </warning>
      </listitem>
    </itemizedlist>
    <para />
  </section>
  <section id="AutoSaveOptions">
    <title>Auto-save options</title>
    <itemizedlist>
      <listitem>
        <para>
          <guilabel>Write metadata after timeout</guilabel>
          <para />
          If checked, metadata writes will be made automatically at the defined interval. Warning dialogues will be issued if required.
        </para>
      </listitem>
      <listitem>
        <para>
          <guilabel>Write metadata on image change</guilabel>
          <para />
          If checked, metadata writes will be made when you move focus to another image.
        </para>
      </listitem>
      <listitem>
        <para>
          <guilabel>Write metadata on directory change</guilabel>
          <para />
          If checked, metadata writes will be made when you move focus to another folder.
        </para>
      </listitem>
    </itemizedlist>
    <para />
  </section>
  <section id="SpellCheck">
    <title>Spelling Checks</title>
    <para>If selected, spelling checks will be enabled on the following panes:</para>
    <itemizedlist>
      <listitem>
        <para>
          <guilabel>Title</guilabel>
        </para>
      </listitem>
      <listitem>
        <para>
          <guilabel>Comment</guilabel>
        </para>
      </listitem>
      <listitem>
        <para>
          <guilabel>Headline</guilabel>
        </para>
      </listitem>
    </itemizedlist>
    <para />
  </section>
  <section id="PreLoadMetadata">
    <title>Pre-load metadata</title>
    <itemizedlist>
      <listitem>
        <para>
          <guilabel>Read metadata in background</guilabel>
          <para />
          Using the folder sorting options:
          <para />
          <guilabel>Exif date original</guilabel>
          <para />
          <guilabel>Exif date digitized</guilabel>
          <para />
          <guilabel>Rating</guilabel>
          <para />
          requires metadata to be read from all files in a folder before the sort action can be made. If a folder contains a large number of file, this can take a noticeable period of time.
          <para />
          If this option is checked, Geeqie will automatically read the required metatada in the background as soon as a folder is opened. This will reduce the amount of time you have to wait until the sort is completed.
          <para />
          If you do not use these sort options, leave this option unchecked.
        </para>
      </listitem>
    </itemizedlist>
    <para />
  </section>
  <section id="MetadataFlowchart">
    <title>Metadata Write Sequence Flowchart</title>
    <para>
      <inlinegraphic fileref="metadata-flowchart.png" />
    </para>
    <para />
  </section>
</section>
