Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Feb 3, 2021
1 parent 4f37700 commit 8b358c4
Show file tree
Hide file tree
Showing 108 changed files with 23,396 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
photoscript.egg-info/
build/
dist/
.DS_Store
.condaauto
.vscode/
__pycache__/
working/
.coverage
cov_html/
docsrc/_build/
4 changes: 4 additions & 0 deletions docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +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: d5f9b2e5b1a8c9ad752dbeeea8c04c02
tags: 645f666f9bcd5a90fca523b33c5a78b7
240 changes: 240 additions & 0 deletions docs/README.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@


<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>PhotoScript &mdash; PhotoScript 0.1.1 documentation</title>



<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />







<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->


<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>

<script type="text/javascript" src="_static/js/theme.js"></script>


<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head>

<body class="wy-body-for-nav">


<div class="wy-grid-for-nav">

<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="index.html" class="icon icon-home" alt="Documentation Home"> PhotoScript



</a>







<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>


</div>


<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">






<ul>
<li class="toctree-l1"><a class="reference internal" href="reference.html">photoscript package</a></li>
</ul>



</div>

</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">


<nav class="wy-nav-top" aria-label="top navigation">

<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">PhotoScript</a>

</nav>


<div class="wy-nav-content">

<div class="rst-content">

















<div role="navigation" aria-label="breadcrumbs navigation">

<ul class="wy-breadcrumbs">

<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>

<li>PhotoScript</li>


<li class="wy-breadcrumbs-aside">


<a href="_sources/README.rst.txt" rel="nofollow"> View page source</a>


</li>

</ul>


<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<div class="section" id="photoscript">
<h1>PhotoScript<a class="headerlink" href="#photoscript" title="Permalink to this headline"></a></h1>
<div class="section" id="what-is-photoscript">
<h2>What is PhotoScript<a class="headerlink" href="#what-is-photoscript" title="Permalink to this headline"></a></h2>
<p>PhotoScript provides a python wrapper around Apple Photos applescript interface. With PhotoScript you can interact with Photos using python. Runs only on MacOS. Tested on MacOS Catalina.</p>
</div>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<p>PhotoScript uses setuptools, thus simply run:</p>
<p><code class="docutils literal notranslate"><span class="pre">python3</span> <span class="pre">setup.py</span> <span class="pre">install</span></code></p>
</div>
<div class="section" id="example">
<h2>Example<a class="headerlink" href="#example" title="Permalink to this headline"></a></h2>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot; Simple example showing use of photoscript &quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">photoscript</span>

<span class="n">photoslib</span> <span class="o">=</span> <span class="n">photoscript</span><span class="o">.</span><span class="n">PhotosLibrary</span><span class="p">()</span>

<span class="n">photoslib</span><span class="o">.</span><span class="n">activate</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Running Photos version: </span><span class="si">{</span><span class="n">photoslib</span><span class="o">.</span><span class="n">version</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

<span class="n">album</span> <span class="o">=</span> <span class="n">photoslib</span><span class="o">.</span><span class="n">album</span><span class="p">(</span><span class="s2">&quot;Album1&quot;</span><span class="p">)</span>
<span class="n">photos</span> <span class="o">=</span> <span class="n">album</span><span class="o">.</span><span class="n">photos</span>

<span class="k">for</span> <span class="n">photo</span> <span class="ow">in</span> <span class="n">photos</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">photo</span><span class="o">.</span><span class="n">title</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">photo</span><span class="o">.</span><span class="n">description</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">photo</span><span class="o">.</span><span class="n">keywords</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

<span class="n">new_album</span> <span class="o">=</span> <span class="n">photoslib</span><span class="o">.</span><span class="n">create_album</span><span class="p">(</span><span class="s2">&quot;New Album&quot;</span><span class="p">)</span>
<span class="n">photoslib</span><span class="o">.</span><span class="n">import_photos</span><span class="p">([</span><span class="s2">&quot;/Users/rhet/Downloads/test.jpeg&quot;</span><span class="p">],</span> <span class="n">album</span><span class="o">=</span><span class="n">new_album</span><span class="p">)</span>

<span class="n">photoslib</span><span class="o">.</span><span class="n">quit</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="see-also">
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/RhetTbull/osxphotos">osxphotos</a>: Python package that provides read-only access to the Photos library including all associated metadata.</p></li>
</ul>
</div>
</div>


</div>

</div>
<footer>


<hr/>

<div role="contentinfo">
<p>

&copy; Copyright 2020, Rhet Turnbull

</p>
</div>



Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a

<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>

provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>

</div>
</div>

</section>

</div>


<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>






</body>
</html>
Loading

0 comments on commit 8b358c4

Please sign in to comment.