fixed formatting (#1096)

This commit is contained in:
Rhet Turnbull
2023-06-18 16:22:46 -07:00
committed by GitHub
parent 492e1edb7f
commit 2c80226ec8
88 changed files with 187 additions and 189 deletions

View File

@@ -3,6 +3,7 @@ import os.path
import osxphotos
def main():
db = os.path.expanduser("~/Pictures/Photos Library.photoslibrary")
photosdb = osxphotos.PhotosDB(db)
@@ -15,11 +16,14 @@ def main():
print(photosdb.albums_as_dict)
# find all photos with Keyword = Foo and containing John Smith
photos = photosdb.photos(keywords=["Foo"],persons=["John Smith"])
photos = photosdb.photos(keywords=["Foo"], persons=["John Smith"])
# find all photos that include Alice Smith but do not contain the keyword Bar
photos = [p for p in photosdb.photos(persons=["Alice Smith"])
if p not in photosdb.photos(keywords=["Bar"]) ]
photos = [
p
for p in photosdb.photos(persons=["Alice Smith"])
if p not in photosdb.photos(keywords=["Bar"])
]
for p in photos:
print(
p.uuid,
@@ -34,5 +38,6 @@ def main():
p.path,
)
if __name__ == "__main__":
main()
main()