From 4f64eeb996d43953eb90618465d2bd046282c4bb Mon Sep 17 00:00:00 2001 From: finestream Date: Wed, 16 Dec 2020 20:58:04 +0100 Subject: [PATCH 1/3] Update README.md Possible documentation improvement to Issue #293 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 926aa873..bc96191d 100644 --- a/README.md +++ b/README.md @@ -729,6 +729,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 (please note labels are only awailable on Photos 5 and higer): + +`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` From 3155045ec87d83285f2e66210559f4be0a10e3a2 Mon Sep 17 00:00:00 2001 From: finestream Date: Wed, 16 Dec 2020 21:17:08 +0100 Subject: [PATCH 2/3] Update README.md Fixed language --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc96191d..6efe19a5 100644 --- a/README.md +++ b/README.md @@ -729,7 +729,7 @@ 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 (please note labels are only awailable on Photos 5 and higer): +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}"` From e097f3aad546b5be5eabab529bd2c35ce3056876 Mon Sep 17 00:00:00 2001 From: finestream Date: Wed, 16 Dec 2020 21:25:52 +0100 Subject: [PATCH 3/3] Update __main__.py Possible fix of Issue RhetTbull/osxphotos#293 --- osxphotos/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osxphotos/__main__.py b/osxphotos/__main__.py index b26cd84f..714dc9d6 100644 --- a/osxphotos/__main__.py +++ b/osxphotos/__main__.py @@ -174,6 +174,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]]}'