osxphotos/examples/custom_sidecar_json.mako
Rhet Turnbull 3999e54f6c
Feature custom sidecar 1123 cache (#1131)
* Added caching to Template, fixed typos

* Added additional sidecar tests
2023-07-25 06:44:39 -07:00

11 lines
561 B
Mako

<%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
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)}