Metadata-Version: 2.1
Name: photos-to-sqlite
Version: 0.3a0
Summary: Save details of your photos to a SQLite database and upload them to S3
Home-page: https://github.com/dogsheep/photos-to-sqlite
Author: Simon Willison
License: Apache License, Version 2.0
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: sqlite-utils (>=2.7)
Requires-Dist: boto3 (>=1.12.41)
Requires-Dist: osxphotos (>=0.28.13) ; sys_platform == "darwin"
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

# photos-to-sqlite

[![PyPI](https://img.shields.io/pypi/v/photos-to-sqlite.svg)](https://pypi.org/project/photos-to-sqlite/)
[![Changelog](https://img.shields.io/github/v/release/dogsheep/photos-to-sqlite?include_prereleases&label=changelog)](https://github.com/dogsheep/photos-to-sqlite/releases)
[![CircleCI](https://circleci.com/gh/dogsheep/photos-to-sqlite.svg?style=svg)](https://circleci.com/gh/dogsheep/photos-to-sqlite)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/dogsheep/photos-to-sqlite/blob/master/LICENSE)

Save details of your photos to a SQLite database and upload them to S3

## Installation

    $ pip install photos-to-sqlite

## Authentication

Create S3 credentials. This is a huge pain.

Run this command and paste in your credentials:

    $ photos-to-sqlite s3-auth

This will create a file called `auth.json` in your current directory containing the required values. To save the file at a different path or filename, use the `--auth=myauth.json` option.

## Uploading photos

Run this command to upload every photo in a specific directory to your S3 bucket:

    $ photos-to-sqlite upload photos.db ~/Desktop

The command will only upload photos that have not yet been uploaded, based on their sha256 hash.

To see what the command would do without uploading any files, use the `--dry-run` option.

## Importing Apple Photos metadata

The `apple-photos` command can be run _after_ the `upload` command to import metadata from your Apple Photos library.

    $ photo-to-sqlite apple-photos photos.db

Imported metadata includes places, people, albums, quality scores and machine learning labels for the photo contents.


