divecmd drives libdivecomputer to extract the contents of your dive computer in a safe, simple manner. It has several programs:
- dcmd(1), which downloads, parses, and formats dives;
- dcmdterm(1), which graphs formatted dives in an ANSI/VT100 terminal;
- dcmd2grap(1), which graphs using grap(1);
- dcmd2json(1), which exports dive profiles to the JSON format;
- dcmd2csv(1), which exports to CSV (usually for Subsurface).
- dcmdfind(1), which searches for dives;
- dcmdedit(1), which edits dive properties;
- dcmdls(1), which lists dive profiles.
It compiles and runs on Linux, Mac OS X, and OpenBSD. For Mac OS X machines with homebrew, see BSD.lv's homebrew-repo.
There are also some supporting utilities:
- dcmd2pdf(1), which manages a groff(1) toolchain into PDF;
- dcmd2ps(1), which does the same but for PS (Mac OS X's groff(1) doesn't have PDF support); and
I forked libdivecomputer's dctool to write dcmd(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...
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!
You'll probably need to provide paths to the third-party libdivecomputer
To do so, just add a file
configure.local that includes the
CPPFLAGS set to the appropriate paths.
It will be automatically picked up when you run
Alternatively, you can pas the
CPPFLAGS variables to the
Note: this is a shell script, not a Makefile component, so no spaces around the equal sign.
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.