tags = list(set(descr.split()) & categories)
tags = [x for x in descr.split() if x in categories]
If memory serves, the reason it doesn’t first split the description on white space is that some categories contain whitespace, and would never match.
words = descr.split()
if len(words) == 1:
phrases = 
for i in range(2, len(words) + 1):
phrases += get_phrases_of_len(i, words)
return words + phrases
def get_phrases_of_len(length, words):
return [' '.join(words[i:i+length]) for i in range((len(words) - length) + 1)]
You want "launchctl unload /System/Library/LaunchAgents/com.apple.photolibraryd.plist".
launchctl stop com.apple.photolibraryd
Add a description to a photo, search for that description in Photos for iOS, and there will be no results.
Out of all the photo library management apps, apple photos is by far the most performant.
The data is there. It should be available to all applications!
If photolibraryd has that file open permanently for exclusive access, I think that shouldn’t work; photolibraryd either should keep write rights and others shouldn’t be able to open the file, as long as it has the file open, or you run the risk of database corruption (probably recoverable) when photolibraryd can only write half of what it wants to write (which will happen is, I think, implementation defined because of the existence of NFS)
I also think it is unlikely that photolibraryd has code checking for that the file becomes read only ⇒ apparently, photolibraryd periodically reopens that file for writing. If so, one should be able to race it for exclusively opening it.
Also, I’m curious. Photos.app must have a way to open that database for writing. How does it do that? Does it stop photolibraryd? Send it a signal?