diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2012-08-18 19:33:40 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-18 09:53:32 -0700 |
commit | 413065dcdccebe3a97813e9c45a654820f98e0e6 (patch) | |
tree | 4155af98babd78ada9a804e041bb5ac31d165fd7 /xslt/jdivelog2subsurface.xslt | |
parent | 76fc14f1b4c62506a6a9a8ee27d21ec992a65993 (diff) | |
download | subsurface-413065dcdccebe3a97813e9c45a654820f98e0e6.tar.gz |
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>
Diffstat (limited to 'xslt/jdivelog2subsurface.xslt')
-rw-r--r-- | xslt/jdivelog2subsurface.xslt | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/xslt/jdivelog2subsurface.xslt b/xslt/jdivelog2subsurface.xslt index e2f40c560..6e85cbfbc 100644 --- a/xslt/jdivelog2subsurface.xslt +++ b/xslt/jdivelog2subsurface.xslt @@ -64,6 +64,21 @@ </buddy> </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> <xsl:if test="DiveActivity != ''"> Diveactivity: <xsl:value-of select="DiveActivity"/> @@ -74,15 +89,9 @@ Divetype: <xsl:value-of select="DiveType"/> <xsl:if test="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 test="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 test="Comment != ''"> Comment: <xsl:value-of select="Comment"/> </xsl:if> |