diff --git a/README.md b/README.md index 12ad1de2..3ec63ba6 100644 --- a/README.md +++ b/README.md @@ -284,15 +284,24 @@ Options: Deleted' folder. --update Only export new or updated files. See notes below on export and --update. - --ignore-signature When used with --update, ignores file + --ignore-signature When used with '--update', ignores file signature when updating files. This is useful if you have processed or edited exported photos changing the file signature (size & - modification date). In this case, --update + modification date). In this case, '--update' would normally re-export the processed files - but with --ignore-signature, files which exist - in the export directory will not be re- - exported. + but with '--ignore-signature', files which + exist in the export directory will not be re- + exported. If used with '--sidecar', '--ignore- + signature' has the following behavior: 1) if + the metadata (in Photos) that went into the + sidecar did not change, the sidecar will not + be updated; 2) if the metadata (in Photos) + that went into the sidecar did change, a new + sidecar is written but a new image file is + not; 3) if a sidecar does not exist for the + photo, a sidecar will be written whether or + not the photo file was written or updated. --only-new If used with --update, ignores any previously exported files, even if missing from the export folder and only exports new files that @@ -377,7 +386,8 @@ Options: does not export tag groups. Sidecar filename is in format photoname.ext.json; For a list of tags exported in the JSON and exiftool - sidecar, see '--exiftool'. + sidecar, see '--exiftool'. See also '--ignore- + signature'. --sidecar-drop-ext Drop the photo's extension when naming sidecar files. By default, sidecar files are named in format 'photo_filename.photo_ext.sidecar_ext', diff --git a/docs/.buildinfo b/docs/.buildinfo index 663c940c..c7cfc3c5 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 17bac89a05164f8fa737ad20fcd95f80 +config: 657c3de477547cc2058cc24ebb377071 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_modules/index.html b/docs/_modules/index.html index c1c5747e..e041636f 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -5,7 +5,7 @@ - Overview: module code — osxphotos 0.40.8 documentation + Overview: module code — osxphotos 0.40.16 documentation diff --git a/docs/_modules/osxphotos/photoinfo/_photoinfo_exifinfo.html b/docs/_modules/osxphotos/photoinfo/_photoinfo_exifinfo.html index 534d06e2..c76afa59 100644 --- a/docs/_modules/osxphotos/photoinfo/_photoinfo_exifinfo.html +++ b/docs/_modules/osxphotos/photoinfo/_photoinfo_exifinfo.html @@ -5,7 +5,7 @@ - osxphotos.photoinfo._photoinfo_exifinfo — osxphotos 0.40.8 documentation + osxphotos.photoinfo._photoinfo_exifinfo — osxphotos 0.40.16 documentation diff --git a/docs/_modules/osxphotos/photoinfo/_photoinfo_export.html b/docs/_modules/osxphotos/photoinfo/_photoinfo_export.html index 2ca91508..fef37176 100644 --- a/docs/_modules/osxphotos/photoinfo/_photoinfo_export.html +++ b/docs/_modules/osxphotos/photoinfo/_photoinfo_export.html @@ -5,7 +5,7 @@ - osxphotos.photoinfo._photoinfo_export — osxphotos 0.40.8 documentation + osxphotos.photoinfo._photoinfo_export — osxphotos 0.40.16 documentation @@ -595,11 +595,11 @@ if export_db is None: export_db = ExportDBNoOp() - if verbose is None: - verbose = noop - elif not callable(verbose): + if verbose and not callable(verbose): raise TypeError("verbose must be callable") - self._verbose = verbose + + if verbose is None: + verbose = self._verbose # suffix to add to edited files # e.g. name will be filename_edited.jpg @@ -1534,8 +1534,8 @@ if len(long_str) > _MAX_IPTC_KEYWORD_LEN ] if long_keywords: - logging.warning( - f"Some keywords exceed max IPTC Keyword length of {_MAX_IPTC_KEYWORD_LEN}: {long_keywords}" + self._verbose( + f"Warning: some keywords exceed max IPTC Keyword length of {_MAX_IPTC_KEYWORD_LEN} (exiftool will truncate these): {long_keywords}" ) keyword_list.extend(rendered_keywords) @@ -1814,17 +1814,6 @@ if _OSXPHOTOS_NONE_SENTINEL not in keyword ] - # check to see if any keywords too long - long_keywords = [ - long_str - for long_str in rendered_keywords - if len(long_str) > _MAX_IPTC_KEYWORD_LEN - ] - if long_keywords: - logging.warning( - f"Some keywords exceed max IPTC Keyword length of {_MAX_IPTC_KEYWORD_LEN}: {long_keywords}" - ) - keyword_list.extend(rendered_keywords) # remove duplicates diff --git a/docs/_modules/osxphotos/photoinfo/_photoinfo_scoreinfo.html b/docs/_modules/osxphotos/photoinfo/_photoinfo_scoreinfo.html index 566f38b5..0130ce33 100644 --- a/docs/_modules/osxphotos/photoinfo/_photoinfo_scoreinfo.html +++ b/docs/_modules/osxphotos/photoinfo/_photoinfo_scoreinfo.html @@ -5,7 +5,7 @@ - osxphotos.photoinfo._photoinfo_scoreinfo — osxphotos 0.40.8 documentation + osxphotos.photoinfo._photoinfo_scoreinfo — osxphotos 0.40.16 documentation diff --git a/docs/_modules/osxphotos/photoinfo/_photoinfo_searchinfo.html b/docs/_modules/osxphotos/photoinfo/_photoinfo_searchinfo.html index 3fd9b691..85a19b11 100644 --- a/docs/_modules/osxphotos/photoinfo/_photoinfo_searchinfo.html +++ b/docs/_modules/osxphotos/photoinfo/_photoinfo_searchinfo.html @@ -5,7 +5,7 @@ - osxphotos.photoinfo._photoinfo_searchinfo — osxphotos 0.40.8 documentation + osxphotos.photoinfo._photoinfo_searchinfo — osxphotos 0.40.16 documentation diff --git a/docs/_modules/osxphotos/photoinfo/photoinfo.html b/docs/_modules/osxphotos/photoinfo/photoinfo.html index 19ad6175..c8e537af 100644 --- a/docs/_modules/osxphotos/photoinfo/photoinfo.html +++ b/docs/_modules/osxphotos/photoinfo/photoinfo.html @@ -5,7 +5,7 @@ - osxphotos.photoinfo.photoinfo — osxphotos 0.40.8 documentation + osxphotos.photoinfo.photoinfo — osxphotos 0.40.16 documentation @@ -103,6 +103,7 @@ self._uuid = uuid self._info = info self._db = db + self._verbose = self._db._verbose @property def filename(self): diff --git a/docs/_modules/osxphotos/photosdb/photosdb.html b/docs/_modules/osxphotos/photosdb/photosdb.html index 6f1ef210..9156e7bb 100644 --- a/docs/_modules/osxphotos/photosdb/photosdb.html +++ b/docs/_modules/osxphotos/photosdb/photosdb.html @@ -5,7 +5,7 @@ - osxphotos.photosdb.photosdb — osxphotos 0.40.8 documentation + osxphotos.photosdb.photosdb — osxphotos 0.40.16 documentation diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index a5b86876..6be9df5d 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.40.8', + VERSION: '0.40.16', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/cli.html b/docs/cli.html index 67f3c7c8..237d1b2e 100644 --- a/docs/cli.html +++ b/docs/cli.html @@ -5,7 +5,7 @@ - osxphotos command line interface (CLI) — osxphotos 0.40.8 documentation + osxphotos command line interface (CLI) — osxphotos 0.40.16 documentation diff --git a/docs/genindex.html b/docs/genindex.html index fee32228..f93c5315 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -5,7 +5,7 @@ - Index — osxphotos 0.40.8 documentation + Index — osxphotos 0.40.16 documentation diff --git a/docs/index.html b/docs/index.html index e935d6be..f6e2280a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,7 +5,7 @@ - Welcome to osxphotos’s documentation! — osxphotos 0.40.8 documentation + Welcome to osxphotos’s documentation! — osxphotos 0.40.16 documentation diff --git a/docs/modules.html b/docs/modules.html index afc53a11..b7bcf918 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -5,7 +5,7 @@ - osxphotos — osxphotos 0.40.8 documentation + osxphotos — osxphotos 0.40.16 documentation diff --git a/docs/osxphotos.pdf b/docs/osxphotos.pdf index 43afaef1..8cd5f8a5 100644 Binary files a/docs/osxphotos.pdf and b/docs/osxphotos.pdf differ diff --git a/docs/reference.html b/docs/reference.html index ab3f25ed..c1985c95 100644 --- a/docs/reference.html +++ b/docs/reference.html @@ -5,7 +5,7 @@ - osxphotos package — osxphotos 0.40.8 documentation + osxphotos package — osxphotos 0.40.16 documentation diff --git a/docs/search.html b/docs/search.html index cdec37ed..9bff32a1 100644 --- a/docs/search.html +++ b/docs/search.html @@ -5,7 +5,7 @@ - Search — osxphotos 0.40.8 documentation + Search — osxphotos 0.40.16 documentation diff --git a/osxphotos/cli.py b/osxphotos/cli.py index da20941d..28f3f9a6 100644 --- a/osxphotos/cli.py +++ b/osxphotos/cli.py @@ -447,11 +447,18 @@ def cli(ctx, db, json_, debug): @click.option( "--ignore-signature", is_flag=True, - help="When used with --update, ignores file signature when updating files. " + help="When used with '--update', ignores file signature when updating files. " "This is useful if you have processed or edited exported photos changing the " - "file signature (size & modification date). In this case, --update would normally " - "re-export the processed files but with --ignore-signature, files which exist " - "in the export directory will not be re-exported.", + "file signature (size & modification date). In this case, '--update' would normally " + "re-export the processed files but with '--ignore-signature', files which exist " + "in the export directory will not be re-exported. " + "If used with '--sidecar', '--ignore-signature' has the following behavior: " + "1) if the metadata (in Photos) that went into the sidecar did not change, " + "the sidecar will not be updated; " + "2) if the metadata (in Photos) that went into the sidecar did change, " + "a new sidecar is written but a new image file is not; " + "3) if a sidecar does not exist for the photo, a sidecar will be written " + "whether or not the photo file was written or updated.", ) @click.option( "--only-new", @@ -569,7 +576,8 @@ def cli(ctx, db, json_, debug): "\n--sidecar exiftool: create JSON sidecar compatible with output of 'exiftool -j'. " "Unlike '--sidecar json', '--sidecar exiftool' does not export tag groups. " "Sidecar filename is in format photoname.ext.json; " - "For a list of tags exported in the JSON and exiftool sidecar, see '--exiftool'.", + "For a list of tags exported in the JSON and exiftool sidecar, see '--exiftool'. " + "See also '--ignore-signature'.", ) @click.option( "--sidecar-drop-ext",