~jack/misc

misc/photoscripts/split-jpg-by-date -rwxr-xr-x 191 bytes
008ecc90Jack Kelly Add functional-images to default.nix/ci 21 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

get_date() {
    echo `exif -t'Date and Time' $1 | grep Value | awk '{print$2}' | tr ':' '-'`
}

for f in *.jpg; do
    d=`get_date $f`
    [ -d $d ] || mkdir $d
    mv $f $d
done