Updated template language to match autofile

* Added field_arg to template grammar

* Updated template grammar to match autofile MTL

* Added format and filter args from autofile

* Added cloud_metadata to PhotoInfo

* Version bump, updated docs

* Added tests for filters
This commit is contained in:
Rhet Turnbull
2022-05-27 18:33:07 -07:00
committed by GitHub
parent 999b16e80f
commit 0a973d67f9
6 changed files with 417 additions and 176 deletions

View File

@@ -5,16 +5,20 @@
"""
import pathlib
from typing import List, Union
from typing import List, Optional, Union
import osxphotos
from osxphotos import ExportOptions, PhotoInfo
def example(photo: osxphotos.PhotoInfo, **kwargs) -> Union[List, str]:
""" example function for {function} template; adds suffix of # if photo has adjustments and ! if photo is a favorite
def example(
photo: PhotoInfo, options: ExportOptions, args: Optional[str] = None, **kwargs
) -> Union[List, str]:
"""example function for {function} template; adds suffix of # if photo has adjustments and ! if photo is a favorite
Args:
photo: osxphotos.PhotoInfo object
options: osxphotos.ExportOptions object
args: optional str of arguments passed to template function
**kwargs: not currently used, placeholder to keep functions compatible with possible changes to {function}
Returns: