Skip to content

Home Photo Bank: a safe place to store photos on your home network – with thumbnails, year/month/day folders, tags, search, favourites and download for email.

License

Notifications You must be signed in to change notification settings

ericclack/home-photo-bank

Repository files navigation

Home Photo Bank

Philosophy:

  • Home Photo Bank – a safe place to store photos on your home network
  • Photos are always JPEGs – if not, convert them first using your photo software
  • Use EXIF: Photos are organised by creation date
  • Named photos contain keywords
  • Home network is fast
  • Never modify photo files, except moving them into their category folders

Features:

  • Auto generated thumbnails
  • Photos stored on the file system in year/month/day folders
  • Tags & search
  • Dowload for email
  • Favourites & download ZIP
  • Basic duplicate detection (with SHA-256 hash).

Screen shots

Search Screen Shot

Photo Screen Shot

Prerequisites

You will need a Java JVM, Leiningen 2.0 or above installed, plus MongoDB.

Read install instructions for Raspberri Pi 5.

If you want to add photos with no date (e.g. scans or images created by PhotoShop / GIMP) then you'll need exiftool, which can be installed on Debian with:

sudo apt-get install libimage-exiftool-perl

Set up

Start up MongoDB, or run it as a service.

Now add its name to profiles.clj, here's an example:

{:profiles/dev  {:env {:media-path "media"
                       :database-url "mongodb://localhost/photo-bank" }}
 
 :profiles/test {:env {:media-path "media-test"
                       :database-url "mongodb://localhost/photo-bank-test" }}}

Create the media/_import, media/_process and media/_failed directories, these are used when importing photos into your photo bank.

Running

To start a web server for the application, run:

lein run

Photo metadata

Photo Bank uses EXIF data to find the date taken and stores photos by year/month/date. It also uses any words in the filename for a simple keyword search, you can easily add more keywords.

Import some photos

Put some photos into the _process directory on the server(*), then click the Import menu item in the app. You can now add some initial keywords to each image and start the import process.

This process copies the photos into their category directory (year/month/day of creation) and generates metadata from the filename and stores in MongoDB.

The import process runs every 2 minutes, so wait a few minutes before browsing to the app home page to see the photos.

* Automate the copying of files to the app

Create some keys and scripts so that you can just drop photos into a ForPhotoBank folder on your computer and have them appear in the app automatically.

  1. Set up a new user on your server and generate keys for copy scripts:

(needs testing)

server> sudo adduser --disabled-password photo-uploader 
server> su - photo-uploader
server> ln -s path-to-media-process-directory ~photo-uploader/
server> ssh-keygen

Now add your own SSH key to photo-uploader's authorized_keys file:

your-computer> cat .ssh/id_rsa.pub
server> emacs .ssh/authorized_keys
  1. Now set permissions on the _process directory:
server> cd path/to/_process
server> chgrp photo-uploader .
server> chmod +t .
  1. Add a copy script on your own computer:

Review and modify the script resources/tools/copy-photos-to-bank

To Do

Take a look at the Issues Page.

License

GNU General Public License v3.0

Copyright © 2017/18 Eric Clack

About

Home Photo Bank: a safe place to store photos on your home network – with thumbnails, year/month/day folders, tags, search, favourites and download for email.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published