osxphotos | Python app to export pictures | Widget library
kandi X-RAY | osxphotos Summary
kandi X-RAY | osxphotos Summary
OSXPhotos provides the ability to interact with and query Apple's Photos.app library on macOS. You can query the Photos library database — for example, file name, file path, and metadata such as keywords/tags, persons/faces, albums, etc. You can also easily export both the original and edited photos.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Exports an album
- Get a theme
- Get the default theme
- Returns a theme manager
- Process a database 4
- Process all faceinfo 4
- Process faceinfo
- Execute a SQL statement
- Exports this photo
- Generate a profile
- Returns the list of folders for the given photo
- Dump Photos library
- Display information about Photos library
- Get comments from photosdb
- Prints out the photos library
- Exports the video
- Sort the results of a photo
- Print the help text
- Compute the diff between two databases
- Create the tables
- Exports the given db file from the export database
- Run exiftool
- Query photos
- Process the database
- Timewarp
- Return help text
osxphotos Key Features
osxphotos Examples and Code Snippets
Community Discussions
Trending Discussions on osxphotos
QUESTION
In order to do a deep learning model auto classifying my pictures, I would like to make a copy of all my deleted photos in Mac's photo (unfortunately the "recover" photo put it back on the main photo album, so I loose the fact it was deleted at first).
How can I access the deleted photos ? Having a look on the "photos" package, the data organisation is quite obscure.
At the same time : how can I access the "favorite" tag on each photo (my model should classify in favorite/deleted/not deleted).
I am rather pythonista at first.
Thx, Romain.
EDIT #1I found this package : https://pypi.org/project/osxphotos/#osxphotos which should do the trick, but I've got an error :
...ANSWER
Answered 2020-Jun-27 at 18:30I'm the author of the package you referenced. First, thanks for opening an issue for this bug -- I've fixed the bug and the test case that should have caught this in the first place. I've also added a new "intrash" property so you can access the recently deleted photos. You'll need to update to v0.30.0 either via git or do a pip install --upgrade osxphotos
if you used pip.
Here's a short but complete program that will export the deleted photos, not deleted photos, and favorite photos. It lacks error checking etc. but should be enough to get you started.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install osxphotos
If you aren't familiar with installing python applications, I recommend you install osxphotos with pipx. If you use pipx, you will not need to create a virtual environment as pipx takes care of this. The easiest way to do this on a Mac is to use homebrew:.
Open Terminal (search for Terminal in Spotlight or look in Applications/Utilities)
Install homebrew according to instructions at https://brew.sh/
Type the following into Terminal: brew install pipx
Then type this: pipx install osxphotos
Now you should be able to run osxphotos by typing: osxphotos
You can also install directly from pypi:.
OSXPhotos uses setuptools, thus simply run:. I recommend you create a virtual environment before installing osxphotos. WARNING The git repo for this project is very large (> 1GB) because it contains multiple Photos libraries used for testing on different versions of macOS. If you just want to use the osxphotos package in your own code, I recommend you install the latest version from PyPI which does not include all the test libraries. If you just want to use the command line utility, you can download a pre-built executable of the latest release or you can install via pip which also installs the command line app. If you aren't comfortable with running python on your Mac, start with the pre-built executable or pipx as described above.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page