divecmd drives libdivecomputer to extract the contents of your dive computer in a safe, simple manner. It has several programs:
- divecmd(1), which downloads, parses, and formats dives;
- divecmd2term(1), which graphs formatted dives in an ANSI/VT100 terminal;
- divecmd2grap(1), which graphs using grap(1);
- divecmd2json(1), which exports dive profiles to the JSON format; and
- divecmd2csv(1), which exports to CSV (usually for Subsurface).
It compiles and runs on Linux, Mac OS X, and OpenBSD.
There are also some supporting utilities:
- divecmd2pdf(1), which manages a groff(1) toolchain into PDF;
- divecmd2ps(1), which does the same but for PS (Mac OS X's groff(1) doesn't have PDF support); and
- divecmd2divecmd(1), which converts some dive computers' output into a form allowing for better free dive analysis.
I forked libdivecomputer's dctool to write divecmd(1) --- originally to provide output like Subsurface's XML format, but later to significantly simplify the code, to add sandboxing via pledge(2), and to provide multiple front-ends.
If you have a feature in mind, I'm very happy to be encouraged to implement it with new dive computers, gear, or a place to dive...
See "Dive computer analysis" and "Visualising recovery time when free diving" for examples of how divecmd2grap(1), operates. Also see "Suunto D6i temperature rounding", which showcases both temperature and split (by diver) modes.
To install divecmd, you need a recent version of libdivecomputer and libexpat (the latter is installed by default on most modern UNIX machines). You'll probably also want groff(1) and grap(1). Note: if you're running Mac OS X, your version of groff(1) doesn't support PDF output.
Just run the following:
./configure
make
sudo make install
Or if you're on OpenBSD, use doas
instead of sudo
. That's it!
The sources use the LGPL as printed in the LICENSE.md file. Why not the usual ISC license? Because this tool began as a fork of LGPL'd software.