-
Hello and thank you for making such a feature-rich interface to Apple Photos. I have read through many of the examples, relevant discussions, and even through the tutorial, but I was not able to find a way to do the following. I would like to export my photo library (shared amongst my family) using the category 1320 and specifically use the normalized_string (ex. 'Shared by Dawn) for each folder name, in my case there are 5 people. For example, I would like to have the following file structure when exporting:
I was able to find the info using: osxphotos inspect and again using get_photo('617F4499-ACBA-4FA6-A318-98EA5A1B55C7').search_info._db_searchinfo to find the following from the output: ...{'uuid': '617F4499-ACBA-4FA6-A318-98EA5A1B55C7', 'rowid': 866208, 'uuid_0': -6462741689784828063, 'uuid_1': -4083327409844643677, 'groupid': 38051, 'category': 1320, 'owning_groupid': 0, 'content_string': 'Shared by Dawn', 'normalized_string': 'shared by dawn', 'lookup_identifier': ''},... so, my question is : Is there a way to filter by this category and assign the normalized string as the folder name using osxphotos export? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Yes, I would use a template function. See the example here. The template function gets passed the photo being processed and should return the value to use. If you get stuck, I'm happy to take a look later this evening. Basically, get the search_info for the photo passed into the function, find the category (which may or may not be present) and format the value you want then return that or None if not found. Call with |
Beta Was this translation helpful? Give feedback.
-
So, I spent some time last night to work on this and I modified the template_function code below trying to pull out the relevant information like you suggested. But, I think I might be missing some steps. Please forgive the script quality, my python skills are rusty. I call the script using:
And, I get the following output and error: (crash log attached)
Here is the script:
|
Beta Was this translation helpful? Give feedback.
-
It works! I tested it with osxphotos template, like you suggested and it looks like it is able to handle each of the use cases I tried. I will test it out with a full export overnight and see how it goes. Thank you so much for helping me with this! I think this is a great option for families that are contributing to a combined icloud photos album, but don't have the ability to see when individual famliy members contribute to the shared library. In my case, this allows me to export directly to immich which gives me more options and control. |
Beta Was this translation helpful? Give feedback.
Try this version. Apparently
_db_searchinfo
can be None (that is the photo had no categories assigned).