From JDiveLog to Subsurface

Miika Turkia miika.turkia at gmail.com
Wed Nov 2 16:15:08 EDT 2011


On Tue, Nov 1, 2011 at 6:44 PM, Linus Torvalds <
torvalds at linux-foundation.org> wrote:

> ---------- Forwarded message ----------
> From: Linus Torvalds <torvalds at linux-foundation.org>
> Date: Tue, Nov 1, 2011 at 9:42 AM
> Subject: Re: From JDiveLog to Subsurface
> To: Miika Turkia <miika.turkia at gmail.com>
>
>
> On Tue, Nov 1, 2011 at 9:24 AM, Miika Turkia <miika.turkia at gmail.com>
> wrote:
> >
> > I was actually thinking about import feature for people to move from
> other
> > dive log software to subsurface and implement that import using the
> libxslt.
> > And if it would make any sense if I tried to hack together such import
> > feature.
>
> I do think that as an "import" feature, it's probably a good idea.
>
>
Here is some code that uses the JDiveLog XSLT to import the logs to
subsurface. Too bad I do not know enough of GTK to be able to use share dir
as base for the style sheet file. Thus it currently only works on
subsurface's main source dir. I guess someone on the list knows how to do
the missing part (and I do not need to keep googling).

>
> Getting things like that right is always going to be a matter of
> random hacks, and whether you use xslt or C won't much matter. I don't
> know how general-purpose xslt conversions can be, but I assume they
> can set flags depending on random other xml fields and then do
> conditional unit conversions based on those flags if required?
>

Yep, it is possible to conditionally do the unit conversions based on any
xml field.

>
> 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.

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.

miika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20111102/a05abf6d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-XSLT-file-to-open-JDiveLog-logs.patch
Type: text/x-patch
Size: 4422 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20111102/a05abf6d/attachment.bin>


More information about the subsurface mailing list