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.
|
||||
|
||||
import datetime
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
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)
|
||||
TEMPLATE_SUBSTITUTIONS_MULTI_VALUED = {
|
||||
"{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",
|
||||
"{person}": "Person(s) / face(s) in a photo",
|
||||
}
|
||||
@@ -322,12 +323,18 @@ def render_filepath_template(template, photo, none_str="_"):
|
||||
values = photo.persons
|
||||
# remove any _UNKNOWN_PERSON values
|
||||
values = [val for val in values if val != _UNKNOWN_PERSON]
|
||||
# elif field == "folder":
|
||||
# folders = []
|
||||
# # photos must be in an album to be in a folder
|
||||
# albums = photo.albums
|
||||
# for album in albums:
|
||||
# zzz
|
||||
elif field == "folder_album":
|
||||
values = []
|
||||
# photos must be in an album to be in a folder
|
||||
for album in photo.album_info:
|
||||
if album.folder_names:
|
||||
# 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:
|
||||
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>
|
||||
<string>9575E48B-8D5F-5654-ABAC-4431B1167324</string>
|
||||
<key>pid</key>
|
||||
<integer>685</integer>
|
||||
<integer>1486</integer>
|
||||
<key>processname</key>
|
||||
<string>photolibraryd</string>
|
||||
<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">
|
||||
<dict>
|
||||
<key>BackgroundHighlightCollection</key>
|
||||
<date>2020-04-11T13:55:22Z</date>
|
||||
<date>2020-04-12T19:50:22Z</date>
|
||||
<key>BackgroundHighlightEnrichment</key>
|
||||
<date>2020-04-11T13:55:21Z</date>
|
||||
<date>2020-04-12T19:50:22Z</date>
|
||||
<key>BackgroundJobAssetRevGeocode</key>
|
||||
<date>2020-04-11T16:03:49Z</date>
|
||||
<date>2020-04-12T21:11:06Z</date>
|
||||
<key>BackgroundJobSearch</key>
|
||||
<date>2020-04-11T13:55:22Z</date>
|
||||
<date>2020-04-12T19:50:22Z</date>
|
||||
<key>BackgroundPeopleSuggestion</key>
|
||||
<date>2020-04-11T13:55:21Z</date>
|
||||
<date>2020-04-12T19:50:22Z</date>
|
||||
<key>BackgroundUserBehaviorProcessor</key>
|
||||
<date>2020-04-11T06:27:26Z</date>
|
||||
<date>2020-04-12T15:18:31Z</date>
|
||||
<key>PhotoAnalysisGraphLastBackgroundGraphConsistencyUpdateJobDateKey</key>
|
||||
<date>2020-04-11T16:17:41Z</date>
|
||||
<date>2020-04-12T21:11:07Z</date>
|
||||
<key>PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate</key>
|
||||
<date>2020-04-11T06:27:24Z</date>
|
||||
<date>2020-04-12T15:18:31Z</date>
|
||||
<key>PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate</key>
|
||||
<date>2020-04-11T16:03:50Z</date>
|
||||
<date>2020-04-12T19:50:23Z</date>
|
||||
<key>SiriPortraitDonation</key>
|
||||
<date>2020-04-11T06:27:26Z</date>
|
||||
<date>2020-04-12T15:18:31Z</date>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -3,8 +3,8 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>FaceIDModelLastGenerationKey</key>
|
||||
<date>2020-04-11T06:27:27Z</date>
|
||||
<date>2020-04-12T15:18:32Z</date>
|
||||
<key>LastContactClassificationKey</key>
|
||||
<date>2020-04-11T06:27:29Z</date>
|
||||
<date>2020-04-12T15:18:34Z</date>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user