CSV import

Dirk Hohndel dirk at hohndel.org
Wed Jan 7 07:25:12 PST 2015


On Wed, Jan 07, 2015 at 03:01:31PM +0200, Willem Ferguson wrote:
> I have a Subsurface xml file log (7 dives) that I export to CSV, checking
> the option "CSV dive details". Two issues:
> 
> 1) The Subsurface exported CSV data are comma-delimited, yet the Subsurface
> import panel has a default of tab-delimited. Given the column headings
> provided by the CSV export file, it should be rudimentary to test for the
> delimiter used and set the preference in the import panel accordingly.

Funny, that's an idea that I had last night. Do trivial, minimal parsing
and at least auto-detect our own format :-)

> 2) This brings up a second issue. The Subsurface export file provides
> headings upon re-import into Subsurface and the  CSV import table shows the
> imported heading in row # 2. So, it's not necessary to supply the headings
> because they were provided by the import file. But now, what should one do
> with the empty first row of the table? See attached screenshot 1.

That's where the headings need to be dropped. What we need to do is what I
said above - it needs to be pre-populated.

> 3) I have dive notes that look something like this:
> 
> Dive plan:
> 
> 48m     12 min
> 
> asc 30m   2 min
> 
> 30m         1 min (deep stop)
> 
> asc 15m     2 min; switch EAN50 20m
> 
> 15m     1 min
> 
> 12m   2 min
> 
> 9m    3 min
> 
> 6m     5 min
> 
> 4.5m       13 min
> 
> Total run time: 41 minutes
> 
> The dive notes are given, 1 line at a time, in the import table (see
> attached screenshot 2). Result is that each dive takes several rows of space
> in the import table: impossible to parse for import.

That simply is an invalid format.

> In hand-prepared CSV imports, the program handled the information much, much
> better.

Yes - we have no concept of importing such dive/deco plans right now.
Sure, something we could add, but that's a whole new level of interesting
complexity.

/D


More information about the subsurface mailing list