From 0004250e74eacc19f7986742712225116530a67e Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 13 Jun 2020 10:52:18 -0700 Subject: [PATCH] Updated README.md to document template system --- README.md | 9 ++++++++- utils/build_help_table.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ef85a9e..090c54e5 100644 --- a/README.md +++ b/README.md @@ -1408,7 +1408,12 @@ The following substitutions are availabe for use with `PhotoInfo.render_template |{created.month}|Month name in user's locale of the file creation time| |{created.mon}|Month abbreviation in the user's locale of the file creation time| |{created.dd}|2-digit day of the month (zero padded) of file creation time| +|{created.dow}|Day of week in user's locale of the file creation time| |{created.doy}|3-digit day of year (e.g Julian day) of file creation time, starting from 1 (zero padded)| +|{created.hour}|2-digit hour of the file creation time| +|{created.min}|2-digit minute of the file creation time| +|{created.sec}|2-digit second of the file creation time| +|{created.strftime}|Apply strftime template to file creation date/time. Should be used in form {created.strftime,TEMPLATE} where TEMPLATE is a valid strftime template, e.g. {created.strftime,%Y-%U} would result in year-week number of year: '2020-23'. If used with no template will return null value. See https://strftime.org/ for help on strftime templates.| |{modified.date}|Photo's modification date in ISO format, e.g. '2020-03-22'| |{modified.year}|4-digit year of file modification time| |{modified.yy}|2-digit year of file modification time| @@ -1417,6 +1422,9 @@ The following substitutions are availabe for use with `PhotoInfo.render_template |{modified.mon}|Month abbreviation in the user's locale of the file modification time| |{modified.dd}|2-digit day of the month (zero padded) of the file modification time| |{modified.doy}|3-digit day of year (e.g Julian day) of file modification time, starting from 1 (zero padded)| +|{modified.hour}|2-digit hour of the file modification time| +|{modified.min}|2-digit minute of the file modification time| +|{modified.sec}|2-digit second of the file modification time| |{place.name}|Place name from the photo's reverse geolocation data, as displayed in Photos| |{place.country_code}|The ISO country code from the photo's reverse geolocation data| |{place.name.country}|Country name from the photo's reverse geolocation data| @@ -1437,7 +1445,6 @@ The following substitutions are availabe for use with `PhotoInfo.render_template |{label}|Image categorization label associated with a photo (Photos 5 only)| |{label_normalized}|All lower case version of 'label' (Photos 5 only)| - ### Utility Functions The following functions are located in osxphotos.utils diff --git a/utils/build_help_table.py b/utils/build_help_table.py index 67e7693b..52345575 100644 --- a/utils/build_help_table.py +++ b/utils/build_help_table.py @@ -1,6 +1,6 @@ """ Builds the template table in markdown format for README.md """ -from osxphotos.photoinfo.template import ( +from osxphotos.phototemplate import ( TEMPLATE_SUBSTITUTIONS, TEMPLATE_SUBSTITUTIONS_MULTI_VALUED, )