I wasn't having a discussion about Everything and linux search counterparts
https://lemmy.ml/post/35664182/20873413
And kind of as a joke, when I saw that Everything can sort by "exposure time"
I was curious to find if it's possible ?
It seems you can put them in order of exposure time, but not search by exposure time ?
Is that correct or did I miss the boat on that one ?
I think it would be something like
Code: Select all
pic: path:"C:\pics" sort:da-descending ExposureTime:1/20..1/100Code: Select all
find /pics/ -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) \
-exec exiftool -ExposureTime -T {} \; -exec bash -c '
file="$1"
exposure="$2"
# Convert exposure to decimal
if [[ "$exposure" =~ ^([0-9]+)/([0-9]+)$ ]]; then
num="${BASH_REMATCH[1]}"
denom="${BASH_REMATCH[2]}"
exposure_val=$(echo "$num / $denom" | bc -l)
else
exposure_val="$exposure"
fi
# Filter by exposure between 1/100 and 1/20 seconds
if (( $(echo "$exposure_val >= 0.01" | bc -l) )) && (( $(echo "$exposure_val <= 0.05" | bc -l) )); then
atime=$(stat -c %X "$file") # Access time (epoch)
echo "$atime $file"
fi
' bash {} $(exiftool -s3 -ExposureTime {}) | sort -nrNOTE : I don't personnally need to find my files with an exposure between 1/20 and 1/100, it was just to illustrate something relatively obscure fits in to everything