CSV import broken

Dirk Hohndel dirk at hohndel.org
Sun Mar 15 08:02:25 PDT 2015


On Sun, Mar 15, 2015 at 08:26:25AM +0200, Miika Turkia wrote:
> > The actual fix is to have the XSLT files changed to provide Version 3 XML
> > files. For now it's easy enough to hack around so that it at least works.
> 
> I do not (at least initially) agree on producing version 3 from XSLT. This
> is because we cannot produce proper v3 from the CSV as the dive site
> lookups are not going to occur, and the IDs might be incompatible (I
> believe, we could use an extension that produces sha sums, so the IDs would
> probably be OK). I am not sure how big an issue this is, but it might make
> sense, to produce v2 and do the proper conversion afterwards.

I'm perfectly OK with that solution as well.

We might want to add a warning about this in the import code path as well.
Actually we need to do this as I just noticed that we cannot /import/ v2
XML files right now. Oops again.

> Also the parsing of CSV files would probably be even more complex than it
> currently is. But I might still be able to do it in somewhat sensible way,
> even though I have not tested my ideas, at least not yet.

No, I think your argument makes sense. Parsing CSV files is rather rare
and it makes much more sense to rely on our much better tested XML
conversion.

> > I just pushed such a patch.
> 
> Thanks, now I can try to track down the other issues reported with CSV
> import (depths).

And please add the suits parsing. Because at least from my reading of the
code this simply isn't there. parse_manual_file() doesn't have a suitf
argument...

/D


More information about the subsurface mailing list