Added exiftool command

This commit is contained in:
Rhet Turnbull
2022-05-20 22:19:26 -07:00
parent 79e4b333e9
commit 8e9f27995b
23 changed files with 391 additions and 70 deletions

View File

@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="OSXPhotos Template System" href="template_help.html" /><link rel="prev" title="OSXPhotos Tutorial" href="tutorial.html" />
<meta name="generator" content="sphinx-4.4.0, furo 2022.04.07"/>
<title>OSXPhotos Command Line Interface (CLI) - osxphotos 0.49.1 documentation</title>
<title>OSXPhotos Command Line Interface (CLI) - osxphotos 0.49.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=68f4518137b9aefe99b631505a2064c3c42c9852" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -124,7 +124,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">osxphotos 0.49.1 documentation</div></a>
<a href="index.html"><div class="brand">osxphotos 0.49.2 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
@@ -147,7 +147,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
<span class="sidebar-brand-text">osxphotos 0.49.1 documentation</span>
<span class="sidebar-brand-text">osxphotos 0.49.2 documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
@@ -343,6 +343,138 @@ library specified by db to the database specified by DB2</p>
<dd><p>Optional argument(s)</p>
</dd></dl>
</section>
<section id="osxphotos-exiftool">
<h3>exiftool<a class="headerlink" href="#osxphotos-exiftool" title="Permalink to this headline">#</a></h3>
<p>Run exiftool on previously exported files to update metadata.</p>
<p>If you previously exported photos with <cite>osxphotos export</cite> but did not include the
<cite>exiftool</cite> option and you now want to update the metadata of the exported files with
exiftool, you can use this command to do so.</p>
<p>If you simply re-run the <cite>osxphotos export</cite> with <cite>update</cite> and <cite>exiftool</cite>, osxphotos will
re-export all photos because it will detect that the previously exported photos do not have the
exiftool metadata updates. This command will run exiftool on the previously exported photos
to update all metadata then will update the export database so that using <cite>exiftool update</cite>
with <cite>osxphotos export</cite> in the future will work correctly and not unnecessarily re-export photos.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>osxphotos exiftool <span class="o">[</span>OPTIONS<span class="o">]</span> EXPORT_DIRECTORY
</pre></div>
</div>
<p class="rubric">Options</p>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-db-config">
<span class="sig-name descname"><span class="pre">--db-config</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-db-config" title="Permalink to this definition">#</a></dt>
<dd><p>Load configuration options from the export database to match the last export; If any other command line options are used in conjunction with db-config, they will override the corresponding values loaded from the export database; see also load-config.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-load-config">
<span class="sig-name descname"><span class="pre">--load-config</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;CONFIG_FILE&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-load-config" title="Permalink to this definition">#</a></dt>
<dd><p>Load options from file as written with save-config. If any other command line options are used in conjunction with load-config, they will override the corresponding values in the config file; see also db-config.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-save-config">
<span class="sig-name descname"><span class="pre">--save-config</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;CONFIG_FILE&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-save-config" title="Permalink to this definition">#</a></dt>
<dd><p>Save options to file for use with load-config. File format is TOML.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-exiftool-path">
<span class="sig-name descname"><span class="pre">--exiftool-path</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;EXIFTOOL_PATH&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-exiftool-path" title="Permalink to this definition">#</a></dt>
<dd><p>Optionally specify path to exiftool; if not provided, will look for exiftool in $PATH.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-exiftool-option">
<span class="sig-name descname"><span class="pre">--exiftool-option</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;OPTION&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-exiftool-option" title="Permalink to this definition">#</a></dt>
<dd><p>Optional flag/option to pass to exiftool when using exiftool. For example, exiftool-option -m to ignore minor warnings. Specify these as you would on the exiftool command line. See exiftool docs at <a class="reference external" href="https://exiftool.org/exiftool_pod.html">https://exiftool.org/exiftool_pod.html</a> for full list of options. More than one option may be specified by repeating the option, e.g. exiftool-option -m exiftool-option -F.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-exiftool-merge-keywords">
<span class="sig-name descname"><span class="pre">--exiftool-merge-keywords</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-exiftool-merge-keywords" title="Permalink to this definition">#</a></dt>
<dd><p>Merge any keywords found in the original file with keywords used for exiftool and sidecar.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-exiftool-merge-persons">
<span class="sig-name descname"><span class="pre">--exiftool-merge-persons</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-exiftool-merge-persons" title="Permalink to this definition">#</a></dt>
<dd><p>Merge any persons found in the original file with persons used for exiftool and sidecar.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-ignore-date-modified">
<span class="sig-name descname"><span class="pre">--ignore-date-modified</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-ignore-date-modified" title="Permalink to this definition">#</a></dt>
<dd><p>If used with exiftool or sidecar, will ignore the photo modification date and set EXIF:ModifyDate to EXIF:DateTimeOriginal; this is consistent with how Photos handles the EXIF:ModifyDate tag.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-person-keyword">
<span class="sig-name descname"><span class="pre">--person-keyword</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-person-keyword" title="Permalink to this definition">#</a></dt>
<dd><p>Use person in image as keyword/tag when exporting metadata.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-album-keyword">
<span class="sig-name descname"><span class="pre">--album-keyword</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-album-keyword" title="Permalink to this definition">#</a></dt>
<dd><p>Use album name as keyword/tag when exporting metadata.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-keyword-template">
<span class="sig-name descname"><span class="pre">--keyword-template</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;TEMPLATE&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-keyword-template" title="Permalink to this definition">#</a></dt>
<dd><p>For use with exiftool, sidecar; specify a template string to use as keyword in the form {name,DEFAULT} This is the same format as directory. For example, if you wanted to add the full path to the folder and album photo is contained in as a keyword when exporting you could specify keyword-template “{folder_album}” You may specify more than one template, for example keyword-template “{folder_album}” keyword-template “{created.year}”. See replace-keywords and Templating System below.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-replace-keywords">
<span class="sig-name descname"><span class="pre">--replace-keywords</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-replace-keywords" title="Permalink to this definition">#</a></dt>
<dd><p>Replace keywords with any values specified with keyword-template. By default, keyword-template will add keywords to any keywords already associated with the photo. If replace-keywords is specified, values from keyword-template will replace any existing keywords instead of adding additional keywords.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-description-template">
<span class="sig-name descname"><span class="pre">--description-template</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;TEMPLATE&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-description-template" title="Permalink to this definition">#</a></dt>
<dd><p>For use with exiftool, sidecar; specify a template string to use as description in the form {name,DEFAULT} This is the same format as directory. For example, if you wanted to append exported with osxphotos on [todays date] to the description, you could specify description-template “{descr} exported with osxphotos on {today.date}” See Templating System below.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-exportdb">
<span class="sig-name descname"><span class="pre">--exportdb</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;exportdb&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-exportdb" title="Permalink to this definition">#</a></dt>
<dd><p>Optional path to export database (if not in the default location in the export directory).</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-report">
<span class="sig-name descname"><span class="pre">--report</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;REPORT_FILE&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-report" title="Permalink to this definition">#</a></dt>
<dd><p>Write a report of all files that were exported. The extension of the report filename will be used to determine the format. Valid extensions are: .csv (CSV file), .json (JSON), .db and .sqlite (SQLite database). REPORT_FILE may be a template string (see Templating System), for example, report export_{today.date}.csv will write a CSV report file named with todays date. See also append.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-append">
<span class="sig-name descname"><span class="pre">--append</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-append" title="Permalink to this definition">#</a></dt>
<dd><p>If used with report, add data to existing report file instead of overwriting it. See also report.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-V">
<span id="cmdoption-osxphotos-exiftool-v"></span><span id="cmdoption-osxphotos-exiftool-verbose"></span><span class="sig-name descname"><span class="pre">-V</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--verbose</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-V" title="Permalink to this definition">#</a></dt>
<dd><p>Print verbose output.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-timestamp">
<span class="sig-name descname"><span class="pre">--timestamp</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-timestamp" title="Permalink to this definition">#</a></dt>
<dd><p>Add time stamp to verbose output</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-dry-run">
<span class="sig-name descname"><span class="pre">--dry-run</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-dry-run" title="Permalink to this definition">#</a></dt>
<dd><p>Run in dry-run mode (dont actually update files), e.g. for use with update-signatures.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-theme">
<span class="sig-name descname"><span class="pre">--theme</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;THEME&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-theme" title="Permalink to this definition">#</a></dt>
<dd><p>Specify the color theme to use for verbose output. Valid themes are dark, light, mono, and plain. Defaults to dark or light depending on system dark mode setting.</p>
<dl class="field-list simple">
<dt class="field-odd">Options</dt>
<dd class="field-odd"><p>dark | light | mono | plain</p>
</dd>
</dl>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-db">
<span class="sig-name descname"><span class="pre">--db</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;PHOTOS_LIBRARY_PATH&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-db" title="Permalink to this definition">#</a></dt>
<dd><p>Specify Photos database path. Path to Photos library/database can be specified using either db or directly as PHOTOS_LIBRARY positional argument. If neither db or PHOTOS_LIBRARY provided, will attempt to find the library to use in the following order: 1. last opened library, 2. system library, 3. ~/Pictures/Photos Library.photoslibrary</p>
</dd></dl>
<p class="rubric">Arguments</p>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-exiftool-arg-EXPORT_DIRECTORY">
<span id="cmdoption-osxphotos-exiftool-arg-export-directory"></span><span class="sig-name descname"><span class="pre">EXPORT_DIRECTORY</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-exiftool-arg-EXPORT_DIRECTORY" title="Permalink to this definition">#</a></dt>
<dd><p>Required argument</p>
</dd></dl>
</section>
<section id="osxphotos-export">
<h3>export<a class="headerlink" href="#osxphotos-export" title="Permalink to this headline">#</a></h3>
<p>Export photos from the Photos database.
@@ -2568,6 +2700,7 @@ Commands:
<li><a class="reference internal" href="#osxphotos-diff">diff</a></li>
<li><a class="reference internal" href="#osxphotos-docs">docs</a></li>
<li><a class="reference internal" href="#osxphotos-dump">dump</a></li>
<li><a class="reference internal" href="#osxphotos-exiftool">exiftool</a></li>
<li><a class="reference internal" href="#osxphotos-export">export</a></li>
<li><a class="reference internal" href="#osxphotos-exportdb">exportdb</a></li>
<li><a class="reference internal" href="#osxphotos-help">help</a></li>