Feature custom sidecar 1123 cache (#1131)

* Added caching to Template, fixed typos

* Added additional sidecar tests
This commit is contained in:
Rhet Turnbull
2023-07-25 06:44:39 -07:00
committed by GitHub
parent 02b6698c80
commit 3999e54f6c
4 changed files with 93 additions and 6 deletions

View File

@@ -1,6 +1,11 @@
<%doc>
Mako template to dump a full json representation of the photo object
Can be run from the command line with:
osxphotos export /path/to/export --sidecar-template custom_sidecar_json.mako "{filepath}.json" yes no yes
Mako template to dump a full json representation of the photo object
Can be run from the command line with:
osxphotos export /path/to/export --sidecar-template custom_sidecar_json.mako "{filepath}.json" yes no yes
The template will be passed three variables for rendering:
photo: a PhotoInfo object for the photo being exported
photo_path: a pathlib.Path object for the photo file being exported
sidecar_path: a pathlib.Path object for the sidecar file being written
</%doc>
${photo.json(shallow=False, indent=4)}