Import of Poseidon CCR dive logs

Miika Turkia miika.turkia at gmail.com
Mon Oct 20 03:13:57 PDT 2014


Hi Willem,

On Mon, Oct 20, 2014 at 11:16 AM, Willem Ferguson <
willemferguson at zoology.up.ac.za> wrote:

> Miika,
>
> I refer to the discussions we had about Poseidon dive log imports early
> this year and the problem with developing XSLT transforms without using
> XSLT 2.
>
> Attached are:
> 1) C code
> 2) two text files comprising a raw Poseidon log dump.
>
> Would you be prepared to look at the C code and see whether this could be
> of any use at all? This is not meant as a formal patch, more as a
> proof-of-concept. I have commented fairly liberally to try and make the
> code more understandable.
>

When I was looking into this conversion earlier, I ended up thinking about
writing the whole import in C. This is due to the log file being too big to
be processed as XSLT transformation. I did prototyping in "compressing" the
input csv file from Subsurface (grepping only the lines we are interested
in). But in the end, I think we can  parse the file with same effort and
ignore the XSLT transform in this import.

>
> The issues are:
> 1) Would something like this be useful at all for importing the log data
> into Subsurface? Should one try and stick to XSLT ?
>

This format does not sit well with XSLT, so it might make more sense to
read it in C code (C++ should work as well).


> 2) Assuming a C-code approach is viable, then one needs to solve the issue
> of automatic recognition of the Poseidon log files by Subsurface so that
> the universal log importer can be used (Import -> Import log files). The
> raw log dump contains 2 files with extensions of .txt and .csv.
>

This should be quite easy if we assume user selects the .csv file. We do
currently have the option to select what type of log file is selected. And
we can trigger special parsing when Poseidon is selected. This selection
should be quite easy from our current import functions.

I am away from the office at the moment with very erratic Internet access.
> So if I do not respond soon, please excuse me. Will be back next week 29th.
>

I was hoping, I could do some coding during the GSoC mentor summit this
weekend. And this import was what I was planning on looking at.

miika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141020/ba6c0c2e/attachment.html>


More information about the subsurface mailing list