taking pictures, currently using the Sony RX100
I am not into the habit of taking RAW, the Sony stores .jpg pictures in sufficiently good quality for me. This quality allows to store much more on the 32GB medium, while still having great resolution and quality of the stored picture.
I then create a new directory for the i.e. 3 weeks Japan trip, and copy a customized theme and a Makefile in there
Subdirectories get created, called i.e. “00_travel, 01_arrival and so on”.
Pictures from the cameras SD-card are copied to the computer, they are named i.e. P1020097.JPG .
To get the pictures with filenames reflecting the time they were taken, I use the following command which uses the utility exif, on Fedora installed using “yum install exif”. As you guessed, this uses the pictures exif informations:
# rename pic based on exif infos
for i in P*.JPG; do
mv $i $(exif $i | grep '^Date and Time (Origi' | sed -e 's,.*|,,' -e 's, ,_,' -e 's,:,,g').jpg;
done
# for i in *; do if [[ $(identify -format '%[exif:orientation]' $i ) -eq 6 ]]; then
# echo "portrait found: $i"; convert $i -rotate 90 "$(echo $i|sed -e 's,\.jpg,_rotated.jpg,')";
# rm $i
# fi; done
Now the following command converts landscape pictures to 1920x and portrait pictures to x1920. This resolution is sufficient for my usual pictures, and considerably smaller than default resulution. The command uses “identify” and “convert” from
ImageMagick.
# for i in *jpg; do
# echo -n "working on: $i ";
# if [[ $(identify -format '%[exif:orientation]' $i ) -eq 1 ]]; then
# echo "landscape pic."; convert $i -resize 1920x "`echo $i|sed -e 's,\.jpg,_small.jpg,'`";
# else
# echo "portrait pic."; convert $i -resize x1920 "`echo $i|sed -e 's,\.jpg,_small.jpg,'`";
# fi;
# done
I run over the pictures with “qiv -fm *jpg” and delete either the small or the unchanged version pressing “d”.
Now all pictures in the directory are customized. Now I run “ls -1 *jpg >captions.txt” and modify that file, add descriptions for some of the pictures. Also reordering them here will lead to them reordered in the resulting album. “captions.txt” is a function of the “album” software.
Now, having this done for all subdirectories, I go to the main directory and run “make”. This runs the
album script to create the static album. Album creates html files, creates small preview versions of the pictures and so on. The resulting directory can directly be offered via http.
I have a special make target to convert the pictures down, so I they consume much less space and I can present them on the “asus nexus 7” tabled. The Makefile:
all:
album -index index.html .
show:
for i in $( album -list_themes|grep ^Theme|sed -e 's,Theme: ,,' ); do
album -theme $i ; read
done
nexus:
mkdir -p nexus7
for i in $(find [012]* -maxdepth 1 -type f -name '*.jpg'); do
convert $i -resize 1280x800 nexus7/$(echo $i | sed -e 's,.*/,,');
done