Commit graph

21 commits

Author SHA1 Message Date
Miika Turkia
f040912395 CSV import: import of last field
The last field ends with new line instead of field separator.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-10-07 17:41:14 +03:00
Miika Turkia
3f5b5f7b3e CSV import: do not add quote to single word
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-10-07 17:41:14 +03:00
Miika Turkia
d3239aed0f CSV import: support for quoted "
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-10-07 17:41:14 +03:00
Miika Turkia
b3694faefc CSV import: support for quoted " within field
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-10-07 17:41:14 +03:00
Miika Turkia
9540793552 CSV import: simplify code
These two cases were identical, so simplifying the code.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-10-07 17:41:14 +03:00
Miika Turkia
3cf9989d65 Import: move some "functions" to commonTemplates
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-02-15 17:54:05 +02:00
Miika Turkia
405e5050a1 Move XSLT depth conversion to commonTemplates
Moving depth conversion template from MacDive specific XSLT to
commonTemplates.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-02-15 17:54:05 +02:00
Miika Turkia
0a84c6e693 CSV import: return value only if it exists
If the last two fields were empty, we returned the field separator as
next to last value. Now we make sure not to return field separator as
field value.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-01 08:06:09 -07:00
Miika Turkia
3a454d77ba Fix month on Shearwater import
Fixes #1096

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-10-03 07:59:04 -07:00
Miika Turkia
2b8e8849e6 Use full precision on weight system on XSLT transforms
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-25 00:38:03 +01:00
Miika Turkia
737b5bdd5c Count the UDDF samples in different namespaces
Since UDDF import uses different namespaces, we need to count the
temperature samples in all of them to get temperature readings from
waypoints.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01 07:09:59 -08:00
Miika Turkia
793758c483 Move getFieldByIndex template to common templates
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26 09:25:29 -08:00
Miika Turkia
0ac8ab3070 Add support for Shearwater Desktop XML logs
Fixes #342

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-08 07:12:18 -08:00
Miika Turkia
a88f413f70 Add depth conversions to XSLT
Convert depth to and from mm.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:40:22 -08:00
Miika Turkia
80bced4f56 Rounding error on time change
When we convert time in seconds to mm:ss format, we do not want to round
but get floor instead.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-16 11:52:05 -07:00
Miika Turkia
cfa36448a1 XSLT for importing individual DM4 dives
This XSLT can be used when exporting single dives from DM4 and importing
them to Subsurface.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-22 09:07:00 -07:00
Miika Turkia
6a98588ed0 Added support for UDDf version 3.1
This adds support for UDDF version 3.1 as produced by at least
DiversDiary. Basically we have to include the different name space into
our selections.

This patch also checks if the temperature is zero on all samples and
skips temperature readings if it looks like the dive computer does not
record them.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-19 13:49:21 -07:00
Miika Turkia
f22527fdaf Fix XSLT when no weight system is given
Summing up weights ended only when there was one parameter left. With no
parameters we ended up in an infinite loop. Now we end also in case of
no parameters.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-10 13:43:02 -07:00
Miika Turkia
42ea5e3510 .DLD generation for uploading to divelogs.de
This generates a .DLD file of selected dives to be uploaded to
divelogs.de. The actual upload functionality along with sensible user
interface is still to be implemented. However, the resulting file from
this patch is tested to work (as far as I can tell) using upload API of
divelogs.de.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-10 09:29:12 -07:00
Miika Turkia
0f9142b4e3 Grab a bit more info from UDDF import
otu and po2 are now grabbed. The po2 value comes from setpo2 tag. Also
divecomputerid is constructed from the generator information.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-01 23:49:09 -08:00
Miika Turkia
438299ff55 Parse ISO 8601 time format
This is an XSLT implementation of a function to parse the ISO 8601
datetime format used in uddf.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 10:39:03 -08:00