Updated docs [skip ci]

This commit is contained in:
Rhet Turnbull
2021-12-26 20:09:10 -08:00
parent b71c752e9d
commit 0e54a08ae0
13 changed files with 83 additions and 20 deletions

View File

@@ -731,6 +731,15 @@ Options:
repeating '--regex' with different arguments.
--selected Filter for photos that are currently selected
in Photos.
--exif EXIF_TAG VALUE Search for photos where EXIF_TAG exists in
photo's EXIF data and contains VALUE. For
example, to find photos created by Adobe
Photoshop: `--exif Software 'Adobe Photoshop'
`or to find all photos shot on a Canon camera:
`--exif Make Canon`. EXIF_TAG can be any valid
exiftool tag, with or without group name, e.g.
`EXIF:Make` or `Make`. To use --exif, exiftool
must be installed and in the path.
--query-eval CRITERIA Evaluate CRITERIA to filter photos. CRITERIA
will be evaluated in context of the following
python list comprehension: `photos = [photo
@@ -1864,13 +1873,13 @@ Both the '{shell_quote}' template and the '|shell_quote' template filter are
available for this purpose. For example, the following command outputs the full
path of newly exported files to file 'new.txt':
--post-command new "echo {filepath.name|shell_quote} >> {shell_quote,{export_dir}/exported.txt}"
--post-command new "echo {filepath|shell_quote} >> {shell_quote,{export_dir}/exported.txt}"
In the above command, the 'shell_quote' filter is used to ensure
'{filepath.name}' is properly quoted and the '{shell_quote}' template ensures
the constructed path of '{exported_dir}/exported.txt' is properly quoted. If
'{filepath.name}' is 'IMG 1234.jpeg' and '{export_dir}' is '/Volumes/Photo
Export', the command thus renders to:
In the above command, the 'shell_quote' filter is used to ensure '{filepath}' is
properly quoted and the '{shell_quote}' template ensures the constructed path of
'{exported_dir}/exported.txt' is properly quoted. If '{filepath}' is 'IMG
1234.jpeg' and '{export_dir}' is '/Volumes/Photo Export', the command thus
renders to:
echo 'IMG 1234.jpeg' >> '/Volumes/Photo Export/exported.txt'

View File

@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a9dc54f8e973cfad202ebe3a13957327
config: 72fd70158d2f5a08b80c8c23b4740046
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; osxphotos 0.43.7 documentation</title>
<title>Overview: module code &#8212; osxphotos 0.43.8 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>osxphotos.photosdb.photosdb &#8212; osxphotos 0.43.6 documentation</title>
<title>osxphotos.photosdb.photosdb &#8212; osxphotos 0.43.8 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/alabaster.css" />
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
@@ -45,6 +45,7 @@
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">tempfile</span>
<span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">OrderedDict</span>
<span class="kn">from</span> <span class="nn">collections.abc</span> <span class="kn">import</span> <span class="n">Iterable</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">timedelta</span><span class="p">,</span> <span class="n">timezone</span>
<span class="kn">from</span> <span class="nn">pprint</span> <span class="kn">import</span> <span class="n">pformat</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span>
@@ -3503,6 +3504,34 @@
<span class="c1"># selection only works if photos selected in main media browser</span>
<span class="n">photos</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">exif</span><span class="p">:</span>
<span class="n">matching_photos</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">photos</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">p</span><span class="o">.</span><span class="n">exiftool</span><span class="p">:</span>
<span class="k">continue</span>
<span class="n">exifdata</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">exiftool</span><span class="o">.</span><span class="n">asdict</span><span class="p">(</span><span class="n">normalized</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">exifdata</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">p</span><span class="o">.</span><span class="n">exiftool</span><span class="o">.</span><span class="n">asdict</span><span class="p">(</span><span class="n">tag_groups</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">normalized</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
<span class="k">for</span> <span class="n">exiftag</span><span class="p">,</span> <span class="n">exifvalue</span> <span class="ow">in</span> <span class="n">options</span><span class="o">.</span><span class="n">exif</span><span class="p">:</span>
<span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">ignore_case</span><span class="p">:</span>
<span class="n">exifvalue</span> <span class="o">=</span> <span class="n">exifvalue</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="n">exifdata_value</span> <span class="o">=</span> <span class="n">exifdata</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">exiftag</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">exifdata_value</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span>
<span class="n">exifdata_value</span> <span class="o">=</span> <span class="n">exifdata_value</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">exifdata_value</span><span class="p">,</span> <span class="n">Iterable</span><span class="p">):</span>
<span class="n">exifdata_value</span> <span class="o">=</span> <span class="p">[</span><span class="n">v</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">exifdata_value</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">exifdata_value</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">exifdata_value</span><span class="p">)</span>
<span class="k">if</span> <span class="n">exifvalue</span> <span class="ow">in</span> <span class="n">exifdata_value</span><span class="p">:</span>
<span class="n">matching_photos</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">exifdata_value</span> <span class="o">=</span> <span class="n">exifdata</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">exiftag</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">exifdata_value</span><span class="p">,</span> <span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="n">Iterable</span><span class="p">)):</span>
<span class="n">exifdata_value</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">exifdata_value</span><span class="p">)</span>
<span class="k">if</span> <span class="n">exifvalue</span> <span class="ow">in</span> <span class="n">exifdata_value</span><span class="p">:</span>
<span class="n">matching_photos</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
<span class="n">photos</span> <span class="o">=</span> <span class="n">matching_photos</span>
<span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">function</span><span class="p">:</span>
<span class="k">for</span> <span class="n">function</span> <span class="ow">in</span> <span class="n">options</span><span class="o">.</span><span class="n">function</span><span class="p">:</span>
<span class="n">photos</span> <span class="o">=</span> <span class="n">function</span><span class="p">[</span><span class="mi">0</span><span class="p">](</span><span class="n">photos</span><span class="p">)</span>
@@ -3630,7 +3659,7 @@
&copy;2021, Rhet Turnbull.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.2.0</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.3.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>

View File

@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.43.7',
VERSION: '0.43.8',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>osxphotos command line interface (CLI) &#8212; osxphotos 0.43.7 documentation</title>
<title>osxphotos command line interface (CLI) &#8212; osxphotos 0.43.8 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
@@ -537,6 +537,12 @@ to modify this behavior.</p>
<dd><p>Filter for photos that are currently selected in Photos.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-export-exif">
<span class="sig-name descname"><span class="pre">--exif</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;EXIF_TAG</span> <span class="pre">VALUE&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-export-exif" title="Permalink to this definition"></a></dt>
<dd><p>Search for photos where EXIF_TAG exists in photos EXIF data and contains VALUE. For example, to find photos created by Adobe Photoshop: <cite>exif Software Adobe Photoshop `or to find all photos shot on a Canon camera: `exif Make Canon</cite>. EXIF_TAG can be any valid exiftool tag, with or without group name, e.g. <cite>EXIF:Make</cite> or <cite>Make</cite>. To use exif, exiftool must be installed and in the path.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-export-query-eval">
<span class="sig-name descname"><span class="pre">--query-eval</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;CRITERIA&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-export-query-eval" title="Permalink to this definition"></a></dt>
@@ -1506,6 +1512,12 @@ if more than one option is provided, they are treated as “AND”
<dd><p>Filter for photos that are currently selected in Photos.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-query-exif">
<span class="sig-name descname"><span class="pre">--exif</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;EXIF_TAG</span> <span class="pre">VALUE&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-query-exif" title="Permalink to this definition"></a></dt>
<dd><p>Search for photos where EXIF_TAG exists in photos EXIF data and contains VALUE. For example, to find photos created by Adobe Photoshop: <cite>exif Software Adobe Photoshop `or to find all photos shot on a Canon camera: `exif Make Canon</cite>. EXIF_TAG can be any valid exiftool tag, with or without group name, e.g. <cite>EXIF:Make</cite> or <cite>Make</cite>. To use exif, exiftool must be installed and in the path.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-osxphotos-query-query-eval">
<span class="sig-name descname"><span class="pre">--query-eval</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;CRITERIA&gt;</span></span><a class="headerlink" href="#cmdoption-osxphotos-query-query-eval" title="Permalink to this definition"></a></dt>

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &#8212; osxphotos 0.43.7 documentation</title>
<title>Index &#8212; osxphotos 0.43.8 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
@@ -261,6 +261,15 @@
<ul>
<li><a href="cli.html#cmdoption-osxphotos-repl-emacs">osxphotos-repl command line option</a>
</li>
</ul></li>
<li>
--exif &lt;EXIF_TAG VALUE&gt;
<ul>
<li><a href="cli.html#cmdoption-osxphotos-export-exif">osxphotos-export command line option</a>
</li>
<li><a href="cli.html#cmdoption-osxphotos-query-exif">osxphotos-query command line option</a>
</li>
</ul></li>
<li>
@@ -630,6 +639,8 @@
<li><a href="cli.html#cmdoption-osxphotos-query-no-likes">osxphotos-query command line option</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
--no-location
@@ -639,8 +650,6 @@
<li><a href="cli.html#cmdoption-osxphotos-query-no-location">osxphotos-query command line option</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
--no-place
@@ -1684,6 +1693,8 @@
<li><a href="cli.html#cmdoption-osxphotos-export-edited">--edited</a>
</li>
<li><a href="cli.html#cmdoption-osxphotos-export-edited-suffix">--edited-suffix &lt;SUFFIX&gt;</a>
</li>
<li><a href="cli.html#cmdoption-osxphotos-export-exif">--exif &lt;EXIF_TAG VALUE&gt;</a>
</li>
<li><a href="cli.html#cmdoption-osxphotos-export-exiftool">--exiftool</a>
</li>
@@ -2009,6 +2020,8 @@
<li><a href="cli.html#cmdoption-osxphotos-query-duplicate">--duplicate</a>
</li>
<li><a href="cli.html#cmdoption-osxphotos-query-edited">--edited</a>
</li>
<li><a href="cli.html#cmdoption-osxphotos-query-exif">--exif &lt;EXIF_TAG VALUE&gt;</a>
</li>
<li><a href="cli.html#cmdoption-osxphotos-query-external-edit">--external-edit</a>
</li>

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to osxphotoss documentation! &#8212; osxphotos 0.43.7 documentation</title>
<title>Welcome to osxphotoss documentation! &#8212; osxphotos 0.43.8 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>osxphotos &#8212; osxphotos 0.43.7 documentation</title>
<title>osxphotos &#8212; osxphotos 0.43.8 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>

Binary file not shown.

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>osxphotos package &#8212; osxphotos 0.43.7 documentation</title>
<title>osxphotos package &#8212; osxphotos 0.43.8 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &#8212; osxphotos 0.43.7 documentation</title>
<title>Search &#8212; osxphotos 0.43.8 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />

File diff suppressed because one or more lines are too long