divecmd2term —
graph dives on the terminal
divecmd2term |
[-alntv]
[files...] |
The
divecmd2term utility accepts XML files
generated by
divecmd(1) and graphs depths and/or
temperatures on the terminal. Multiple dives are stacked atop each other. Its
arguments are as follows:
-
-
- -a
- Accumulate dives instead of showing them stacked. This is
useful for free-diving where multiple dives are done in sequence.
-
-
- -l
- Show the legend.
-
-
- -n
- Don't show UTF-8 or ANSI colours.
-
-
- fl t
- Show temperatures if the dive profile contains them.
-
-
- -v
- Parse files in verbose mode.
-
-
- files...
- XML input files with one or more dives.
divecmd2term uses ANSI/VT100 terminal escapes for
console manipulation and colours. If
files is
empty or “-”, standard input is used.
By default,
divecmd2term graphs depth. Each dive is
associated with a colour that is the same for both graphs. In practise, more
than three dives is a little much. A title is printed above the graphs, along
with the associated line colour, identifying the dive.
Multiple graphs are stacked atop each other with the x-axis being the relative
time into the dive. In
-a accumulation mode,
however, graphs are shown as starting at the first date and time. (Dives must
have been parsed with a date and time). This is useful, for example, with a
sequence of free-dives.
The
divecmd2term utility exits 0 on success,
and >0 if an error occurs.
To pipe the output of the day's free-dives from on a Suunto D6i:
divecmd -r "" "suunto d6i"
| divecmd2term -a
This will extract only the current day's dives, then format them alongside
(instead of stacked) using UTF-8 characters.
To compare two dive profiles previously downloaded into
dive1.xml and
dive2.xml, run:
divecmd2term dive1.xml dive2.xml
divecmd(1)
The
divecmd2term utility was written by
Kristaps Dzonsons,
kristaps@bsd.lv.