From JDiveLog to Subsurface

Linus Torvalds torvalds at
Wed Nov 2 16:27:38 EDT 2011

On Wed, Nov 2, 2011 at 1:15 PM, Miika Turkia <miika.turkia at> wrote:
> Here is some code that uses the JDiveLog XSLT to import the logs to
> subsurface.

Ok, that probably won't work as-is (install issues, does libxslt work
fine for the windows/macos builds, etc), but it certainly looks like a
fairly nice way to handle the random import issues.

>> So if you want to do the xslt rules to convert Suunto SDM files, for
>> example, I would certainly not object. I'll happily remove the suunto
>> hacks from our current xml parser.
> If someone has XML logs with some dive log software and subsurface
> (preferably same dives read by both softwares) and is willing to provide
> samples, I can take a look into writing XSLT for that import.

Heh. Easy enough to do from the subsurface source directory itself: just do

  ./subsurface dives/0.xml

to parse one of the suunto dives, and save the result to a new file.

> BTW currently the open and import features seem to be the same. I thought
> that open should open a new log file not merge the new file with already
> open data.

Everything merges with the existing data, but "import" will also
renumber the new dives if they are consecutive, and also marks the
state "dirty" (so it will ask whether you want to save the new file at
the end).

So "open" works as if you passed the filename on the command line -
which tries to avoid any changes - while "import" with an xml file
works as if you imported it from a dive computer.


More information about the subsurface mailing list