I have no idea if this is of any help, but below is a simple bash
script I wrote to extract various tags and send them to STDOUT
in CSV format. As with anything I’ve written I’m sure it can be vastly improved and certainly, it was a quick hack even by my low standards (not to mention since retirement from IT I’m way out of practice / memory). And these days I’m on Windows, so this was run from WSL.
But it works …or at least, worked for me. 
It just does a recursive find
from the current directory, feeds all files found with the extension matching $infileext
and outputs the values of the EXIF tags inside the do
loop. Redirect that to a file then import into a spreadsheet and Bob’s yer uncle.
Per the usage prompt it uses exiv2
so that needs to be on your $PATH
. If you’re not shooting Canon (*.CR2
/ *.CR3
) you’ll need to edit the value of $infileext
to match your raw file extension(s). Also, you can edit / add / delete the tags in the do
loop to match what you want to retrieve.
I guess if you get it really tweaked to your satisfaction, make a cron
job and run it nightly against a directory above all your images, so you’ll always have a current database. It’s trivial to create a data / time based file name so you’ll have unique versions.
Disclaimer - I’m no expert at exiv2
nor metadata in general. I just poked around long enough to get what I needed.
Usage
$ cd /photos
$ /scriptdir/mkimgcsv.sh > images.csv
Here’s how a sample run looks in LibreOffice Calc:
Script
#!/usr/bin/bash
# It emits CSV with basic image info for each raw file found in the folder and below.
#
# View the tags available with `exiv2 -pt IMAGE.CR3`
scriptname=$(basename $0)
infileext="CR(2|3)"
indir="."
noheadopt="--noheader"
fieldstartchar=61
header="\"Filename\",\"Filepath\",\"Timestamp\",\"Lens\",\"Focal length\",\"Aperture\",\"ISO\",\"Shutter speed\",\"AEC\",\"Mode\""
if [ "$1" == "--help" ]
then
echo ""
echo "Invokes exiv2 against all *.${infileext} files in the current directory and below,"
echo "printing CSV output of EXIF info to stdout. '$noheadopt' (optional) suppresses"
echo "the header line. exiv2 must be installed and on the path. You must have r-x"
echo "access to the specified directory and r-- to the files in it."
echo ""
echo "usage: $scriptname [ --noheader | --help ]"
echo ""
exit
fi
if [ "$1" != "$noheadopt" ]
then
echo "$header"
fi
find "$indir" | egrep "${infileext}$" | while read infile
do
rawfname=$(echo "$infile" | awk -F/ '{print $NF}')
# EXIF tags
tstamp=$(exiv2 -q -K Exif.Image.DateTime $infile | cut -c ${fieldstartchar}-)
lens=$(exiv2 -q -K Exif.CanonCs.LensType $infile | cut -c ${fieldstartchar}- | tr -d '/')
flen=$(exiv2 -q -K Exif.Photo.FocalLength $infile | cut -c ${fieldstartchar}-)
fnum=$(exiv2 -q -K Exif.Photo.FNumber $infile | cut -c ${fieldstartchar}-)
ISO=$(exiv2 -q -K Exif.Photo.ISOSpeedRatings $infile | cut -c ${fieldstartchar}-)
exptime=$(exiv2 -q -K Exif.Photo.ExposureTime $infile | cut -c ${fieldstartchar}-)
expbias=$(exiv2 -q -K Exif.Photo.ExposureBiasValue $infile | cut -c ${fieldstartchar}-)
expprog=$(exiv2 -q -K Exif.Photo.ExposureProgram $infile | cut -c ${fieldstartchar}-)
outstr="\"${rawfname}\",\"${infile}\",\"${tstamp}\",\"${lens}\",\"${flen}\",\"${fnum}\",${ISO},\"${exptime}\",\"${expbias}\",\"${expprog}\""
echo "$outstr"
done