-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdcmdfind.1
119 lines (119 loc) · 3 KB
/
dcmdfind.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
119
.\" $Id$
.\"
.\" Copyright (c) 2018 Kristaps Dzonsons <[email protected]>
.\"
.\" This library is free software; you can redistribute it and/or
.\" modify it under the terms of the GNU Lesser General Public
.\" License as published by the Free Software Foundation; either
.\" version 2.1 of the License, or (at your option) any later version.
.\"
.\" This library is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
.\" Lesser General Public License for more details.
.\"
.\" You should have received a copy of the GNU Lesser General Public
.\" License along with this library; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
.\" MA 02110-1301 USA
.\"
.Dd $Mdocdate$
.Dt DCMDFIND 1
.Os
.Sh NAME
.Nm dcmdfind
.Nd search for dives
.Sh SYNOPSIS
.Nm dcmdfind
.Op Fl v
.Op Fl l Ar limit
.Op Ar
.Sh DESCRIPTION
The
.Nm
utility searches for dives in
.Xr dcmd 1
files.
Its arguments are as follows:
.Bl -tag -width Ds
.It Fl l Ar limit
Limit which dives are emitted.
See
.Sx Limits
for details.
.It Fl v
Emit warnings during parse.
Specify twice for further debugging information.
.El
.Pp
If there are multiple dive computers specified, or multiple divers, the
first is selected to represent all output dives.
.Pp
All dives are merged into a single divelog, so dives must have the same
dive computer as the first (by date), else they are omitted.
Duplicate fingerprints are also omitted.
.Pp
.Nm
produces output on standard output as documented in
.Xr dcmd 1 .
.Ss Limits
Processed dives may be limited with the
.Fl l Ar limit
option consisting of
.Ar key Ns = Ns Ar value
limit pairs.
The keys may be as follows:
.Bl -tag -width Ds
.It Ar dafter Ns = Ns Ar date
Dives starting after (inclusive) the
.Ar date .
.It Ar dbefore Ns = Ns Ar date
Dives starting before (inclusive) the
.Ar date .
.It Ar date Ns = Ns Ar date
Dives starting on the
.Ar date .
.It Ar dive Ns = Ns Ar pid
The dive as described by its
.Xr dcmdls 1
parse identifier.
.It Ar mode Ns = Ns Ar free|open|closed|gauge
Dives matching the
.Ar mode .
.It Ar dtafter Ns = Ns Ar datetime
Dives starting after (inclusive) the
.Ar datetime .
.It Ar dtbefore Ns = Ns Ar datetime
Dives starting before (inclusive) the
.Ar datetime .
.El
.Pp
Dates are always formatted as YYYY-mm-dd.
The special dates
.Qq today
and
.Qq yesterday
refer to the current date and day before, respectively.
Date-times are formatted as YYYY-mm-ddTHH:MM.
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
To list only the current date's dives from all XML files in the current
directory:
.Pp
.Dl dcmdfind -ldate=today *.xml | dcmdls
.Pp
To graph today's open-circuit dive from the same:
.Pp
.Dl dcmdfind -ldate=today -lmode=open *.xml | dcmdterm
.Sh SEE ALSO
.Xr dcmd 1
.Sh AUTHORS
The
.Nm
utility was written by
.An Kristaps Dzonsons ,
.Mt [email protected] .
.Sh BUGS
Some data (e.g., vendor events) are ignored during conversion.
These are reported to standard error.