Test library update
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
# This code isn't elegant but it seems to work well. PRs gladly accepted.
|
# This code isn't elegant but it seems to work well. PRs gladly accepted.
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
from typing import Tuple, List # pylint: disable=syntax-error
|
from typing import Tuple, List # pylint: disable=syntax-error
|
||||||
@@ -55,7 +56,7 @@ TEMPLATE_SUBSTITUTIONS = {
|
|||||||
# Permitted multi-value substitutions (each of these returns None or 1 or more values)
|
# Permitted multi-value substitutions (each of these returns None or 1 or more values)
|
||||||
TEMPLATE_SUBSTITUTIONS_MULTI_VALUED = {
|
TEMPLATE_SUBSTITUTIONS_MULTI_VALUED = {
|
||||||
"{album}": "Album(s) photo is contained in",
|
"{album}": "Album(s) photo is contained in",
|
||||||
# "{folder}": "Folder path + album photo is contained in. e.g. Folder/Subfolder/Album",
|
"{folder_album}": "Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder",
|
||||||
"{keyword}": "Keyword(s) assigned to photo",
|
"{keyword}": "Keyword(s) assigned to photo",
|
||||||
"{person}": "Person(s) / face(s) in a photo",
|
"{person}": "Person(s) / face(s) in a photo",
|
||||||
}
|
}
|
||||||
@@ -322,12 +323,18 @@ def render_filepath_template(template, photo, none_str="_"):
|
|||||||
values = photo.persons
|
values = photo.persons
|
||||||
# remove any _UNKNOWN_PERSON values
|
# remove any _UNKNOWN_PERSON values
|
||||||
values = [val for val in values if val != _UNKNOWN_PERSON]
|
values = [val for val in values if val != _UNKNOWN_PERSON]
|
||||||
# elif field == "folder":
|
elif field == "folder_album":
|
||||||
# folders = []
|
values = []
|
||||||
# # photos must be in an album to be in a folder
|
# photos must be in an album to be in a folder
|
||||||
# albums = photo.albums
|
for album in photo.album_info:
|
||||||
# for album in albums:
|
if album.folder_names:
|
||||||
# zzz
|
# album in folder
|
||||||
|
folder = os.path.sep.join(album.folder_names)
|
||||||
|
folder += os.path.sep + album.title
|
||||||
|
values.append(folder)
|
||||||
|
else:
|
||||||
|
# album not in folder
|
||||||
|
values.append(album.title)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unhandleded template value: {field}")
|
raise ValueError(f"Unhandleded template value: {field}")
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,7 +7,7 @@
|
|||||||
<key>hostuuid</key>
|
<key>hostuuid</key>
|
||||||
<string>9575E48B-8D5F-5654-ABAC-4431B1167324</string>
|
<string>9575E48B-8D5F-5654-ABAC-4431B1167324</string>
|
||||||
<key>pid</key>
|
<key>pid</key>
|
||||||
<integer>685</integer>
|
<integer>1486</integer>
|
||||||
<key>processname</key>
|
<key>processname</key>
|
||||||
<string>photolibraryd</string>
|
<string>photolibraryd</string>
|
||||||
<key>uid</key>
|
<key>uid</key>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,24 +3,24 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>BackgroundHighlightCollection</key>
|
<key>BackgroundHighlightCollection</key>
|
||||||
<date>2020-04-11T13:55:22Z</date>
|
<date>2020-04-12T19:50:22Z</date>
|
||||||
<key>BackgroundHighlightEnrichment</key>
|
<key>BackgroundHighlightEnrichment</key>
|
||||||
<date>2020-04-11T13:55:21Z</date>
|
<date>2020-04-12T19:50:22Z</date>
|
||||||
<key>BackgroundJobAssetRevGeocode</key>
|
<key>BackgroundJobAssetRevGeocode</key>
|
||||||
<date>2020-04-11T16:03:49Z</date>
|
<date>2020-04-12T21:11:06Z</date>
|
||||||
<key>BackgroundJobSearch</key>
|
<key>BackgroundJobSearch</key>
|
||||||
<date>2020-04-11T13:55:22Z</date>
|
<date>2020-04-12T19:50:22Z</date>
|
||||||
<key>BackgroundPeopleSuggestion</key>
|
<key>BackgroundPeopleSuggestion</key>
|
||||||
<date>2020-04-11T13:55:21Z</date>
|
<date>2020-04-12T19:50:22Z</date>
|
||||||
<key>BackgroundUserBehaviorProcessor</key>
|
<key>BackgroundUserBehaviorProcessor</key>
|
||||||
<date>2020-04-11T06:27:26Z</date>
|
<date>2020-04-12T15:18:31Z</date>
|
||||||
<key>PhotoAnalysisGraphLastBackgroundGraphConsistencyUpdateJobDateKey</key>
|
<key>PhotoAnalysisGraphLastBackgroundGraphConsistencyUpdateJobDateKey</key>
|
||||||
<date>2020-04-11T16:17:41Z</date>
|
<date>2020-04-12T21:11:07Z</date>
|
||||||
<key>PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate</key>
|
<key>PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate</key>
|
||||||
<date>2020-04-11T06:27:24Z</date>
|
<date>2020-04-12T15:18:31Z</date>
|
||||||
<key>PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate</key>
|
<key>PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate</key>
|
||||||
<date>2020-04-11T16:03:50Z</date>
|
<date>2020-04-12T19:50:23Z</date>
|
||||||
<key>SiriPortraitDonation</key>
|
<key>SiriPortraitDonation</key>
|
||||||
<date>2020-04-11T06:27:26Z</date>
|
<date>2020-04-12T15:18:31Z</date>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -3,8 +3,8 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>FaceIDModelLastGenerationKey</key>
|
<key>FaceIDModelLastGenerationKey</key>
|
||||||
<date>2020-04-11T06:27:27Z</date>
|
<date>2020-04-12T15:18:32Z</date>
|
||||||
<key>LastContactClassificationKey</key>
|
<key>LastContactClassificationKey</key>
|
||||||
<date>2020-04-11T06:27:29Z</date>
|
<date>2020-04-12T15:18:34Z</date>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user