diff --git a/API_README.md b/API_README.md index 14ee2efe..ec45d5d7 100644 --- a/API_README.md +++ b/API_README.md @@ -1943,7 +1943,7 @@ cog.out(get_template_field_table()) |{lf}|A line feed: '\n', alias for {newline}| |{cr}|A carriage return: '\r'| |{crlf}|a carriage return + line feed: '\r\n'| -|{osxphotos_version}|The osxphotos version, e.g. '0.49.6'| +|{osxphotos_version}|The osxphotos version, e.g. '0.49.7'| |{osxphotos_cmd_line}|The full command line used to run osxphotos| |{album}|Album(s) photo is contained in| |{folder_album}|Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder| diff --git a/README.md b/README.md index 7287e554..6194531b 100644 --- a/README.md +++ b/README.md @@ -1850,7 +1850,7 @@ Substitution Description {lf} A line feed: '\n', alias for {newline} {cr} A carriage return: '\r' {crlf} a carriage return + line feed: '\r\n' -{osxphotos_version} The osxphotos version, e.g. '0.49.6' +{osxphotos_version} The osxphotos version, e.g. '0.49.7' {osxphotos_cmd_line} The full command line used to run osxphotos The following substitutions may result in multiple values. Thus if specified @@ -4026,7 +4026,7 @@ The following template field substitutions are availabe for use the templating s |{lf}|A line feed: '\n', alias for {newline}| |{cr}|A carriage return: '\r'| |{crlf}|a carriage return + line feed: '\r\n'| -|{osxphotos_version}|The osxphotos version, e.g. '0.49.6'| +|{osxphotos_version}|The osxphotos version, e.g. '0.49.7'| |{osxphotos_cmd_line}|The full command line used to run osxphotos| |{album}|Album(s) photo is contained in| |{folder_album}|Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder| diff --git a/docs/.buildinfo b/docs/.buildinfo index 7db19a13..ef9f68d0 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: 9a13bee58e47fb931bf3c0ca8a40d758 +config: 0da8263b5cc3d544b725c487a729f7a1 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_modules/index.html b/docs/_modules/index.html index a765b5f9..5104918d 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -5,7 +5,7 @@ - Overview: module code - osxphotos 0.49.6 documentation + Overview: module code - osxphotos 0.49.7 documentation @@ -123,7 +123,7 @@
-
osxphotos 0.49.6 documentation
+
osxphotos 0.49.7 documentation
@@ -146,7 +146,7 @@
@@ -146,7 +146,7 @@ +
[docs] def get_target_for_file( + self, uuid: str, filename: Union[str, pathlib.Path] + ) -> Optional[str]: + """query database for file matching file name and return the matching filename if there is one; + otherwise return None; looks for file.ext, file (1).ext, file (2).ext and so on to find the + actual target name that was used to export filename + + Returns: the matching filename or None if no match found + """ + conn = self._conn + c = conn.cursor() + filepath_normalized = self._normalize_filepath_relative(filename) + filepath_stem = os.path.splitext(filepath_normalized)[0] + c.execute( + "SELECT uuid, filepath, filepath_normalized FROM export_data WHERE uuid = ? AND filepath_normalized LIKE ?", + ( + uuid, + f"{filepath_stem}%", + ), + ) + results = c.fetchall() + + for result in results: + filepath_normalized = os.path.splitext(result[2])[0] + if re.match(re.escape(filepath_stem) + r"(\s\(\d+\))?$", filepath_normalized): + return os.path.join(self.export_dir, result[1]) + + return None
+
[docs] def get_previous_uuids(self): """returns list of UUIDs of previously exported photos found in export database""" conn = self._conn diff --git a/docs/_modules/osxphotos/photoexporter.html b/docs/_modules/osxphotos/photoexporter.html index 3ac5e344..390e2376 100644 --- a/docs/_modules/osxphotos/photoexporter.html +++ b/docs/_modules/osxphotos/photoexporter.html @@ -5,7 +5,7 @@ - osxphotos.photoexporter - osxphotos 0.49.2 documentation + osxphotos.photoexporter - osxphotos 0.49.7 documentation @@ -123,7 +123,7 @@
@@ -146,7 +146,7 @@
@@ -147,7 +147,7 @@
@@ -145,7 +145,7 @@
@@ -147,7 +147,7 @@
@@ -147,7 +147,7 @@
@@ -147,7 +147,7 @@
@@ -145,7 +145,7 @@
@@ -147,7 +147,7 @@
@@ -144,7 +144,7 @@
@@ -147,7 +147,7 @@
@@ -147,7 +147,7 @@