-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexiftool.txt
72 lines (51 loc) · 2.62 KB
/
exiftool.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Options can't be grouped since they would form a valid tag name
-G -S but not -GS
Output tag with custom formatting
exiftool -p '${createdate;s/:/-/g}' my_pic.jpg
Delete a cached tag in Shotwell
* rm -r ~/.local/share/shotwell ~/.cache/shotwell
* exiftool -xmp:subject= -xmp:lastkeywordxmp= -exif:xpkeywords= .
View embedded thumbnail
exiftool -thumbnailimage '2012-04-23 11.29.04.jpg' -b | ffplay -v error -
TODO: how to avoid duplication when adding tags?
after running the below command 2 times, -keywords will have a value of my_tag, my_tag
exiftool -iptc:keywords+=my_tag my_pic
Implicit tr/// to remove weird characters
${make;}
Data in computer batch mode, not human readable
$createdate#
Add tags
exiftool -sep ', ' -iptc:keywords+='tag1, tag2' picture.jpg
exiftool -sep ', ' -xmp:subject+='tag1, tag2' video.mp4
Delete originals without prompting
exiftool -delete_original! .
Renaming
see 'RENAMING EXAMPLES' in 'man exiftool' + -dateFormat
Copying
see -tagsFromFile in 'man exiftool'
Append the camera 'make' to the file name (check for already existing 'make')
exiftool -ext jpg '-filename<%f ${make;}.%e' -if '${filename;s/\.\S+//} !~ /[[:alpha:]]/i' .
Find file names with a specific tag
exiftool -if '($iptc:keywords && $iptc:keywords =~ /birthday/i) or ($xmp:subject && $xmp:subject =~ /birthday/i)' -p '"$directory/$filename"' . 2>/dev/null
List files without 'tags'
exiftool -if 'not $iptc:keywords and not $xmp:subject' -p '"$directory/$filename"' . 2>/dev/null
Fix wrong creation date
don't forget to apply to datetimeoriginal too + update the file name after!
exiftool -createdate='2007:07:21 07:29:59' '2007-05-27 07.29.59.jpg'
Change the keywords reusing the old ones
exiftool -q -if '$iptc:keywords =~ /^@@@$/i' -p 'exiftool -sep ", " -iptc:keywords="$iptc:keywords" "$filename"' . 2>/dev/null | v -
Look for problems detected by Dropbox. Look for backups
ll **/*(conflict*|_original|~)(D)
List 'incorrectly' named files
ls -1 **/^????-??-??\ ??.??.??*.[^.]##(.)
Find non-media files
ll **/^*.(jpg|jpe|png|avi|mov|mp4|mts|3gp)(D.)
Print files having camera 'make' != samsung|apple
ls -1 **/^*(samsung|apple)*(.) # requires unsetopt case_glob
List files without camera brands in the name
ll **/[^a-zA-Z]##.[^.]##
Mass tagging
exiftool -if '$iptc:keywords !~ /christmas/i' -iptc:keywords+='christmas eve' **/[12]???-12-24*(.)
exiftool -if '$iptc:keywords !~ /christmas/i' -iptc:keywords+='christmas' **/[12]???-12-25*(.)
exiftool -if '$iptc:keywords !~ /birthday/i' -sep ', ' -iptc:keywords+='mitko, birthday' **/October/*-10-19*(.)
exiftool -if '$iptc:keywords !~ /birthday/i' -sep ', ' -iptc:keywords+='iva, birthday' **/May/*-05-30*(.)