Divelog file format documentation

Rick Walsh rickmwalsh at gmail.com
Mon Dec 28 14:11:23 PST 2015


Christian,

On 29 December 2015 at 05:45, Christian RĂ©millard <
christian.remillard at gmail.com> wrote:

> Hi,
>
> I'm looking for the divelog ssrf file format documentation reference. Is
> there any DTD/Schema/other available?
>
>
To the best of my knowledge, no such explicit documentation exists.
However, some clever people designed it to be human readable, and even I
can make sense of it.  It is an xml file, and the best 'documentation' you
are likely to find is an example file.  Either create a log yourself with
Subsurface, or use one of the examples provided in the source (see the
dives directory).  The format has been tweaked over the development, and
the current log format is v3.

A good example in the current format is test40-42.xml, because it includes
multiple dives, some manually entered, and some with dive computer
samples.  You'll have it if you've downloaded the source from git or as a
tarball, otherwise the file on git is here:
http://git.subsurface-divelog.org/index.cgi?p=subsurface.git;a=blob;f=dives/test40-42.xml;h=2fa234d4ba5954c5dd269b19279d46be0f2033b1;hb=1f4d02a861aa22cf4f828e1139e0e6354b24b022

That file doesn't include dive tags, if you want an example of that, the
SampleDivesV2.ssrf file does (the only difference I'm aware of between v2
and v3 format is dive site handling)
http://git.subsurface-divelog.org/index.cgi?p=subsurface.git;a=blob;f=dives/SampleDivesV2.ssrf;h=5189de41fa97e33389a862c90d2d46f51ebc8ff8;hb=1f4d02a861aa22cf4f828e1139e0e6354b24b022

The other 'documentation' is the code that saves the file,
subsurface-core/save-xml.c.  It's less intuitive than the xml file itself,
but the code is well commented.
http://git.subsurface-divelog.org/index.cgi?p=subsurface.git;a=blob;f=subsurface-core/save-xml.c;h=eabcf4f26c6eb280022b38efef92071236f3b00b;hb=1f4d02a861aa22cf4f828e1139e0e6354b24b022

Cheers,

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151229/765cc6be/attachment.html>


More information about the subsurface mailing list