Added {function} template, #419

This commit is contained in:
Rhet Turnbull
2021-04-14 22:00:04 -07:00
parent eff8e7a63f
commit 21dc0d388f
20 changed files with 149 additions and 22 deletions

View File

@@ -1,4 +1,8 @@
""" Example showing how to use a custom function for osxphotos {function} template """
""" Example showing how to use a custom function for osxphotos {function} template
Use: osxphotos export /path/to/export --filename "{function:/path/to/template_function.py::example}"
You may place more than one template function in a single file as each is called by name using the {function:file.py::function_name} format
"""
import pathlib
from typing import List, Union
@@ -7,7 +11,7 @@ import osxphotos
def example(photo: osxphotos.PhotoInfo, **kwargs) -> Union[List, str]:
""" example function for {function} template
""" example function for {function} template; adds suffix of # if photo has adjustments and ! if photo is a favorite
Args:
photo: osxphotos.PhotoInfo object