Home

Awesome

Lychee Upload

A command line tool for uploading photos in a directory or from iPhoto/Aperture libraries to a Lychee installation on a remote server via SSH. Based on lycheesync by Gustave Paté and Phoshare by Google.

Description

Performs a batch image import from a location on hard drive or from an iPhoto/Aperture library to the Lychee installation on a remote server via SSH. When importing from a directory, subdirectories are automatically converted to Lychee albums. As Lychee does not support sub-albums, photos in subsubdirectories are uploaded to the respective album. Photos in the root directory are uploaded to the Unsorted album. In the iPhoto/Aperture mode you can specify what to export. Possible options are events, albums and smart albums. If you want to replace albums in the Lychee database, then you can use -r option. All photos in the existing album will be deleted in the Lychee database and replaced with new ones from the hard drive location.

Installation

First retrieve project either by downloading it from here or if you have git installed, then checkout the project

git clone https://github.com/r0x0r/lycheeupload

Install the following

Debian based Linux

sudo apt-get install imagemagick python python-paramiko python-imaging python-mysql.connector git

OSX

Installing dependencies on OSX is a bit trickier.

First you have to have Command Line Tools for Xcode installed. Go to Downloads for Apple developers, download and install Command Line Tools for Xcode.

Install pip if you do not have it already

sudo easy_install pip

Finally install dependencies using pip sudo pip install --allow-external mysql-connector-python mysql-connector-python paramiko Pillow

Usage

python lycheeupload.py [-h] [-d DIR] [-r] [-p] [-v] username@hostname:path

General options

Directory import options

iPhoto / Aperture options

At very least you must specify a connection string and a source where photos should be imported from (--dir, --iphoto or --aperture options).

For example to import photos from the directory /home/user/photos/ to the remote server example.com with Lychee installed in the /home/user/mydomain.com/ directory, issue the following command

python lycheeupload.py -d /home/user/photos/ user@example.com:/home/user/mydomain.com/

Import all events from the default iPhoto library location (~/Pictures/iPhoto Library)

python lycheeupload.py --iphoto --events user@example.com:/home/user/mydomain.com/

Import all the albums starting with the word "Summer" from the Aperture library located in ~/Pictures/My Aperture Library

python lycheeupload.py --aperture "~/Pictures/My Aperture Library" --albums "Summer.*" user@example.com:/home/user/mydomain.com/

Licence

MIT License

Parts of the program are licensed under the Apache License 2.0