Here is my dumb (for now) strung-together sequence:
Code:
# The Nikon card directory is always called "DCIM" ...
cd DCIM
# We don't want to mess with the originals other than to rename and re-orient them ...
# One bug here is that the directory won't always be called 100D5000, it may be 101D5000, 102D5000, etc., depending on the # of photos on the flash card.
mv 100D5000 big
cd ./big
# We orient the originals based on the EXIF orientation tag ...
jhead -autorot *.JPG
# We rename the originals based on EXIF date (would like a shorter unique basename) ...
for i in $(ls *.JPG); do exiv2 -r '%Y%m%d.%H%M%S.:basename:' rename $i; done
# Now it's time to make smaller editable copies for sending to friends & family ...
mkdir ../{small,print}
for f in $(ls *.JPG); do convert -resize 640x480 -quality 90 $f ../small/$f; done
cd ../small
# Add a white border to provide an area to caption for friends & family to enjoy ...
# Note: We resized BEFORE we added the caption so that the visible photo remains at 640x480 pixels
for f in *.JPG ; do convert $f -bordercolor white -gravity south -splice 0x100 $f; done
mkdir -p email/{family,friend,junk}
# First pass, look at each photo, & copy to specific directories for further action ...
# [1] = To be considered for sending to family
# [2] = To be considered for sending to friends (I never use plural directory names)
# [3] = Consider for both friends and for family
# [4] = Save to be printed later (actually to be reconciled with the original for printing of the original)
# [5] = Delete as junk
feh *.JPG -F --cycle-once --action1 "cp %f ./email/family/%n" --action2 "cp %f ./email/friend/%n" --action3 "cp %f ./email/family/%n; cp %f ./email/friend/%ns" --action5 "mv %f ./junk/%n" --action4 "cp %f ../print/%n"
# For each intention, it's now time to cull down the photos to the bare minimum
# [DEL] = the delete key will delete the copy and remove it from consideration
# [SPACE] = this will allow you to move back and forth between similar photos to further cull out similar photos
# [BACKSPACE] = this will allow you to move back and forth between similar photos to further cull out
cd ./email/family
feh *.JPG -F --cycle-once
cd ../friend
feh *.JPG -F --cycle-once
# Now it's time to add the captions to the short set of photos for emailing out
# Note: Kolourpaint has the easiest captioning of the freeware photo editing tools.
cd ./email/family
for f in *.JPG ; do kolourpaint $f; done
cd ./email/friend
for f in *.JPG ; do kolourpaint $f; done
# OK. Mail away!
mail -s "Photos of the kids" family_alias < ./email/family/*.JPG
mail -s "Photos of the kids" friend_alias < ./email/friend/*.JPG
# Exit gracefully
exit 0
Bookmarks