From 2906773ba13d057cca5ad35f4f70b987b063b871 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 21 Dec 2019 22:18:15 -0800 Subject: [PATCH] Updated README for sidecar usage --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 9358a614..3a7c173d 100644 --- a/README.md +++ b/README.md @@ -488,6 +488,20 @@ Export photo from the Photos library to another destination on disk. - increment: boolean; if True (default=True), will increment file name until a non-existant name is found - sidecar: boolean; if True (default=False) will also write a json sidecar file with EXIF data in format readable by [exiftool](https://exiftool.org/); filename will be dest/filename.ext.json where ext is suffix of the image file (e.g. jpeg or jpg) +The json sidecar file can be used by exiftool to apply the metadata from the json file to the image. For example: + +```python +import osxphotos + +photosdb = osxphotos.PhotosDB() +photos = photosdb.photos() +photos[0].export("/tmp","photo_name.jpg",sidecar=True) +``` + +Then + +`exiftool -j=photo_name.jpg.json photo_name.jpg` + If overwrite=False and increment=False, export will fail if destination file already exists Returns the full path to the exported file