A simple yet powerful library to interact with the SQLite database used by the Apple Photos app on macOS.

Installation

Add the following to your Cargo.toml: toml ... [Dependencies] ... rust-apple-photos = "0.1.0" ...

Basic Usage

```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 = photos.get_albums()?;

println!("You have {} albums!", albums.len());

} ```

Custom Queries

```rust ...

fn getlargeimages() -> Result<()> { ... let bigboys: Vec = photos.query("SELECT * FROM RKMaster WHERE width >= 2000 AND height >= 2000")?; println!("You have {} images that are big!", bigboys.len()); }

... ```

Roadmap

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.

Models

Contributions

If you want to improve anything, go ahead and open up a pull request.

License

rust-apple-photos is available under the MIT license. See the LICENSE file for more info.