Add weight and suit support for JDiveLog import

Use the suit and weightsystem support of Subsurface when importing
divelogs from JDiveLog. (They were previously included in the notes
field as support for these fields was missing from Subsurface.)

After import the weightsystem is undefined and weight unit is the
default of Subsurface. Unfortunately the weight field in JDiveLog is
text field and might contain pounds and kilograms mixed in seemingly
random order. Thus 2 pounds of weight might be transformed to 2 kg.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Miika Turkia 2012-08-18 19:33:40 +03:00 committed by Linus Torvalds
parent 76fc14f1b4
commit 413065dcdc

View file

@ -64,6 +64,21 @@
</buddy> </buddy>
</xsl:if> </xsl:if>
<xsl:if test="Equipment/Suit != ''">
<suit>
<xsl:value-of select="Equipment/Suit"/>
</suit>
<xsl:value-of select="Equipment/Suit"/>
</xsl:if>
<xsl:if test="Equipment/Weight != ''">
<weightsystem>
<xsl:attribute name="weight">
<xsl:value-of select="Equipment/Weight"/>
</xsl:attribute>
</weightsystem>
</xsl:if>
<notes> <notes>
<xsl:if test="DiveActivity != ''"> <xsl:if test="DiveActivity != ''">
Diveactivity: <xsl:value-of select="DiveActivity"/> Diveactivity: <xsl:value-of select="DiveActivity"/>
@ -73,15 +88,9 @@ Divetype: <xsl:value-of select="DiveType"/>
</xsl:if> </xsl:if>
<xsl:if test="Equipment/Visibility != ''"> <xsl:if test="Equipment/Visibility != ''">
Visibility: <xsl:value-of select="Equipment/Visibility"/> Visibility: <xsl:value-of select="Equipment/Visibility"/>
</xsl:if>
<xsl:if test="Equipment/Suit != ''">
Suit: <xsl:value-of select="Equipment/Suit"/>
</xsl:if> </xsl:if>
<xsl:if test="Equipment/Gloves != ''"> <xsl:if test="Equipment/Gloves != ''">
Gloves: <xsl:value-of select="Equipment/Gloves"/> Gloves: <xsl:value-of select="Equipment/Gloves"/>
</xsl:if>
<xsl:if test="Equipment/Weight != ''">
Weight: <xsl:value-of select="Equipment/Weight"/>
</xsl:if> </xsl:if>
<xsl:if test="Comment != ''"> <xsl:if test="Comment != ''">
Comment: <xsl:value-of select="Comment"/> Comment: <xsl:value-of select="Comment"/>