-
Notifications
You must be signed in to change notification settings - Fork 7
/
exifgrep.1
119 lines (96 loc) · 3.87 KB
/
exifgrep.1
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
.\" ...
.\" ... (C) Copyright 2003, 2005 Duane H. Hesser, see LICENSE.EXIFPROBE file
.\" ... @(#) $Id: exifgrep.1,v 1.3 2005/07/02 13:08:18 alex Exp $
.\" ...
.\"
.TH EXIFGREP 1 LOCAL
.SH NAME
exifgrep \- select and reformat the output of \fBexifprobe\fP
.SH SYNOPSIS
.br
.B exifgrep
[\fioptions\fP]
[\fIegrep_options\fP]
\fIegrep_pattern\fP
[\fINOT egrep-pattern]
\fIfilename(s)\fP
.SH DESCRIPTION
.B Exifgrep
is a shell script which applies \fBegrep(1)\fP to the output of \fBexifprobe\fP\ \fI-L\fP,
permitting easy selection and minor reformatting of output items.
\fBexifprobe\fP is small, fast, and utterly sycophantic in its desire to report
\fIeverything\fP it finds in an image. \fBexifgrep\fP applies the regular expression
matching capabilities of \fBegrep\fP to the output barrage to extract only
wanted information.
\fBexifgrep\fP also performs a mild form of selection on
the output fields of \fBexifprobe\fP \fI-L\fP.
Many items reported by exifprobe are represented
in the image file by a \fInumber\fP which compactly represents a defined value.
E.g. \fBexifprobe\fP \fI-L\fP may report
TIFF.Ifd1.ResolutionUnit = 2 = 'pixels per inch'
where the value \*(lq2\*(rq must be interpreted to mean that resolution values
(\fITIFF.IFd1.Xresolution\fP and \fTIFF.IFd1.YResolution\fP) are recorded in pixels per inch,
rather than, say, pixels per centimeter. \fBexifprobe\fP reports both fields;
\fBexifprobe\fP may also report interpreted values for items which are recorded
in unfamiliar units, such as
.nf
JPEG.APP1.Ifd0.Exif.FNumber = 5.6 APEX = 'f7.0'
.fi
In all such cases, \fBexifgrep\fP reports (by default) only the "human readable"
field:
.nf
TIFF.Ifd1.ResolutionUnit = 'pixels per inch'
JPEG.APP1.Ifd0.Exif.FNumber = 'f7.0'
.fi
unless the "\fI-num\fP" option is given to select the numerical value.
In addition, a `variable' format may be selected ("\fI-var\fP") which eliminates
whitespace, providing a format which typical shells may use directly to set
variables for further processing. E.g.
.nf
TIFF.Ifd1.ResolutionUnit='pixels per inch'
JPEG.APP1.Ifd0.Exif.FNumber='f7.0'
.fi
.SH OPTIONS
.IP \-r 10
\fIfile\fP arguments may be directories, which will be searched via \fBfind\fP
for all image types recognized by \fBexifprobe\fP.
.IP \-n 10
force \fBexifprobe\fP to print a filename for each line of its output, which
\fIexifgrep\fP will turn into a comment at the end of each matching line.
.IP \-t 10
force \fBexifprobe\fP to print tag numbers for all itemes that have them, so
that matches may be made on hex or decimal tag numbers.
.IP \-c 10
turn on color output from \fBexifprobe\fP
.IP \-h 10
print a usage message (help)
.IP \-var 10
report in "variable" format, which may be directly `sourced' by any
Bourne-compatible shell (except that most shells will insist that the
dots must be replaced, e.g. by underscores).
.IP \-export 10
report in "variable" format, but with a Bourne-compatible \fIexport\fP
command
.IP \-num 10
report numerical values rather than interpreted strings, for fields which
have both.
.P
NOTE: the \fI\-var\fP and \fI\-export\fP options are obsolescent; they
are retained for compatibility with earlier versions of \fIexifprobe\fP.
A post-processor such as \fIreformat.sh\fP may be more effective for
the current version if shell-compatible output is desired.
.P
Any option not recognized by the script will be passed on to \fBegrep\fP.
The first non-option argument will be used as the pattern passed to \fBegrep\fP.
This may be followed by the keyword \fINOT\fP and an expression representing
matches to be \fIrejected\fP. This pattern will be passed to \fBegrep\fP \fI-v\fP.
Only one argument of each type may be given, and the "accept" expression
(if given) must appear before the "reject" expression.
All remaining arguments are interpreted as image filenames.
.SH SEE ALSO
\fBexifprobe(1)\fP
.SH AUTHOR
.br
Duane H. Hesser
.br
dhh@virtual-cafe.com