-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
209 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Building the documentation | ||
|
||
I'm still trying to learn sphinx and come up with a workflow for building docs. Right now it's | ||
pretty kludgy. | ||
|
||
- `brew install sphinx-doc` or `conda install sphinx` | ||
- `pip install sphinx-rtd-theme` | ||
- `pip install m2r2` | ||
- Download and install [MacTeX](https://tug.org/mactex/) | ||
- Add `/Library/TeX/texbin` to your `$PATH` | ||
- Convert README to rst. I tried using plug-ins to do this and ran into errors with LaTeX to PDF due to the black and MIT license images. | ||
- `m2r2 README.md` | ||
- Move the README.rst that's generated to `docs/source` and edit it to remove the images | ||
- `cd docs` | ||
- `make html` | ||
- `make latexpdf` | ||
- copy `docs/build/latex/photoscript.pdf` to the project root directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
PhotoScript | ||
=========== | ||
|
||
What is PhotoScript | ||
------------------- | ||
|
||
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. | ||
|
||
Installation | ||
------------ | ||
|
||
PhotoScript uses setuptools, thus simply run: | ||
|
||
``python3 setup.py install`` | ||
|
||
Example | ||
------- | ||
|
||
.. code-block:: python | ||
""" Simple example showing use of photoscript """ | ||
import photoscript | ||
photoslib = photoscript.PhotosLibrary() | ||
photoslib.activate() | ||
print(f"Running Photos version: {photoslib.version}") | ||
album = photoslib.album("Album1") | ||
photos = album.photos | ||
for photo in photos: | ||
print(f"{photo.title}, {photo.description}, {photo.keywords}") | ||
new_album = photoslib.create_album("New Album") | ||
photoslib.import_photos(["/Users/rhet/Downloads/test.jpeg"], album=new_album) | ||
photoslib.quit() | ||
See Also | ||
-------- | ||
|
||
|
||
* `osxphotos <https://github.com/RhetTbull/osxphotos>`_\ : Python package that provides read-only access to the Photos library including all associated metadata. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
""" version info """ | ||
|
||
__version__ = "0.0.1" | ||
__version__ = "0.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.