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).
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
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.
To start a web server for the application, run:
lein run
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.
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.
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.
- 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
- Now set permissions on the _process directory:
server> cd path/to/_process
server> chgrp photo-uploader .
server> chmod +t .
- Add a copy script on your own computer:
Review and modify the script resources/tools/copy-photos-to-bank
Take a look at the Issues Page.
GNU General Public License v3.0
Copyright © 2017/18 Eric Clack