Ergonomy vs. features?

by

The endless dilema.

Though I am convinced it is possible to achieve highly complex actions through very little effort.

The problem rose again when I had to convince a newbie it was actually easy to use the photos out of my new dSLR camera. Generally the process to extract photos through a dedicated interface is long and tedious. However it is possible to achieve all that efficiently in a single click.

Look at the code below. Thanks to that I can:

  1. download photos from camera and sort them by date of day in folders
  2. remove possible duplicates if I did not erase camera images since last download
  3. convert RAW images to a usable format

All this in one single click!

#!/bin/bash

# Change this to where to store Photos
target=/home/multimedia/Images
camera= »USB PTP Class Camera »
date=$(date –iso-8601)
mkdir -p $target/$date/tmp
cd $target/$date/tmp
# Get all photos from camera
gphoto2 –quiet –camera $camera –port usb: -P
# Do not replace photos that were already uploaded this same day
cp -u $target/$date/tmp/* $target/$date
rm -rf $target/$date/tmp
cd $target/$date
# auto-rotate using exif info
exifautotran *.JPG
# If photos were not erased from camera since last upload, remove duplicates
for i in *.{JPG,CR2}; do
for f in $(find $target -name $i ! -samefile $target/$date/$i); do
if md5sum $f | sed -e « s, .*/, , » | md5sum –check; then
rm -f $i;
fi
done
done
# decode RAW images if not already done ?
# for i in *.CR2; do if [ ! -e $(basename $i .CR2).ppm ]; then dcraw -w $i; fi; done
# Show them!
gimv -d $target/$date

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s


%d blogueurs aiment cette page :