A simple yet powerful library to interact with the SQLite database used by the Apple Photos app on macOS.
Add the following to your Cargo.toml:
toml
...
[Dependencies]
...
rust-apple-photos = "0.1.0"
...
```rust extern crate rust-apple-photos; extern crate rusqlite;
use rust-apple-photos::ApplePhotos; use rust-apple-photos::types::{ Album };
fn main() -> Result<()>
{
/* Specify other .db path using "newwithpath" method! */
let photos: ApplePhotos = ApplePhotos::new()?;
let albums: Vec
println!("You have {} albums!", albums.len());
} ```
```rust ...
fn getlargeimages() -> Result<()>
{
...
let bigboys: Vec
... ```
There are a lot of models to implement to complete just the base layer of models. There are additional sub-models that will need to be implemented if the goal is to fully replace Apple's own implementation.
If you want to improve anything, go ahead and open up a pull request.
rust-apple-photos is available under the MIT license. See the LICENSE file for more info.