diff --git a/README.md b/README.md index 2be6c83b..da1a5ed9 100644 --- a/README.md +++ b/README.md @@ -741,6 +741,10 @@ Example: export photos to file structure based on 4-digit year and full name of `osxphotos export ~/Desktop/export --directory "{created.year}/{created.month}"` +Example: export photos to file structure based on 4-digit year of photo's creation date and add keywords for media type and labels (labels are only awailable on Photos 5 and higher): + +`osxphotos export ~/Desktop/export --directory "{created.year}" --keyword-template "{label}" --keyword-template "{media_type}"` + Example: export default library using 'country name/year' as output directory (but use "NoCountry/year" if country not specified), add persons, album names, and year as keywords, write exif metadata to files when exporting, update only changed files, print verbose ouput `osxphotos export ~/Desktop/export --directory "{place.name.country,NoCountry}/{created.year}" --person-keyword --album-keyword --keyword-template "{created.year}" --exiftool --update --verbose` diff --git a/osxphotos/__main__.py b/osxphotos/__main__.py index fbe2f2a1..d64d1696 100644 --- a/osxphotos/__main__.py +++ b/osxphotos/__main__.py @@ -177,6 +177,10 @@ which will be rendered to substitute template fields with values from the photo. For example, '{created.month}' would be replaced with the month name of the photo creation date. e.g. 'November'. \n +Options supporting templates may be repeated e.g., --keyword-template '{label}' +--keyword-template '{media_type}' to add both labels and media types to the +keywords. +\n The general format for a template is '{TEMPLATE_FIELD[,[DEFAULT]]}'. Some templates have optional modifiers in form '{[[DELIM]+]TEMPLATE_FIELD[(PATH_SEP)][?VALUE_IF_TRUE][,[DEFAULT]]}'