Bash – Command Line Photo Organiser Like Shotwell but to run on headless server

bashcommand lineimageslinux

Does anyone know of a program (or even bash script) that can take photos from various folders and then consolidate them into one place and organise them into a directory structure by date in the way that Shotwell and simliar can if using a GUI?

I have a headless server that I intend to auto sync family phones (all android) photographs to. The idea would be that newly uploaded photos go into a holding directory and then a script runs on cron to import these into the main picture repository.

I'm currently looking to build this around Owncloud but the android app is very basic and just syncs pictures into the root of the Owncloud folder.

I already have an archive of photos that spans about 10 years and is nicely organsied into folder by the various succession of Linux photo management apps that I have used.

I do suspect that a nice bash script would suffice but I'm looking for a decent off the shelf solution first. If I have to write my own bash script then so be it, any tips you have would be appreciated.

Best Answer

I believe I have found the answer:

http://www.sno.phy.queensu.ca/~phil/exiftool/filename.html

A nice perl utility called exiftool that I was planning to use for getting exif data across a wide range of media files. Turns out it has a directory sorting system

Something along the lines of this command are the answer: exiftool -r -d %Y/%m/%d/image_%H%M%S.%%e "-filename<filemodifydate" DIR

exiftool home page: http://www.sno.phy.queensu.ca/~phil/exiftool/

Related Question