mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
CSV export: Modify format of dive list and dive profile export
In dive list CSV export: - Move unit "min" from duration field to header - Move unit "%" from O2 and He fields to header In dive profile CSV export: - Add "min" to sample time header - Add column for sample heart rate Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
8180e49427
commit
fc01045680
2 changed files with 14 additions and 9 deletions
|
@ -9,10 +9,10 @@
|
|||
<xsl:template match="/divelog/dives">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$units = 1">
|
||||
<xsl:value-of select="concat('"dive number"', $fs, '"date"', $fs, '"time"', $fs, '"sample time"', $fs, '"sample depth (ft)"', $fs, '"sample temperature (F)"', $fs, '"sample pressure (psi)"')"/>
|
||||
<xsl:value-of select="concat('"dive number"', $fs, '"date"', $fs, '"time"', $fs, '"sample time (min)"', $fs, '"sample depth (ft)"', $fs, '"sample temperature (F)"', $fs, '"sample pressure (psi)"', $fs, '"sample heartrate"')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat('"dive number"', $fs, '"date"', $fs, '"time"', $fs, '"sample time"', $fs, '"sample depth (m)"', $fs, '"sample temperature (C)"', $fs, '"sample pressure (bar)"')"/>
|
||||
<xsl:value-of select="concat('"dive number"', $fs, '"date"', $fs, '"time"', $fs, '"sample time (min)"', $fs, '"sample depth (m)"', $fs, '"sample temperature (C)"', $fs, '"sample pressure (bar)"', $fs, '"sample heartrate"')"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>
|
||||
|
@ -72,6 +72,11 @@
|
|||
</xsl:choose>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:value-of select="$fs"/>
|
||||
<xsl:if test="@heartbeat != ''">
|
||||
<xsl:value-of select="concat('"', @heartbeat, '"')"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
<xsl:template match="/divelog/dives">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$units = 1">
|
||||
<xsl:value-of select="concat('"dive number"', $fs, '"date"', $fs, '"time"', $fs, '"duration"', $fs, '"maxdepth (ft)"', $fs, '"avgdepth (ft)"', $fs, '"airtemp (F)"', $fs, '"watertemp (F)"', $fs, '"cylinder size (cuft)"', $fs, '"startpressure (psi)"', $fs, '"endpressure (psi)"', $fs, '"o2"', $fs, '"he"', $fs, '"location"', $fs, '"gps"', $fs, '"divemaster"', $fs, '"buddy"', $fs, '"suit"', $fs, '"rating"', $fs, '"visibility"', $fs, '"notes"', $fs, '"weight (lbs)"', $fs, '"tags"')"/>
|
||||
<xsl:value-of select="concat('"dive number"', $fs, '"date"', $fs, '"time"', $fs, '"duration (min)"', $fs, '"maxdepth (ft)"', $fs, '"avgdepth (ft)"', $fs, '"airtemp (F)"', $fs, '"watertemp (F)"', $fs, '"cylinder size (cuft)"', $fs, '"startpressure (psi)"', $fs, '"endpressure (psi)"', $fs, '"o2 (%)"', $fs, '"he (%)"', $fs, '"location"', $fs, '"gps"', $fs, '"divemaster"', $fs, '"buddy"', $fs, '"suit"', $fs, '"rating"', $fs, '"visibility"', $fs, '"notes"', $fs, '"weight (lbs)"', $fs, '"tags"')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat('"dive number"', $fs, '"date"', $fs, '"time"', $fs, '"duration"', $fs, '"maxdepth (m)"', $fs, '"avgdepth (m)"', $fs, '"airtemp (C)"', $fs, '"watertemp (C)"', $fs, '"cylinder size (l)"', $fs, '"startpressure (bar)"', $fs, '"endpressure (bar)"', $fs, '"o2"', $fs, '"he"', $fs, '"location"', $fs, '"gps"', $fs, '"divemaster"', $fs, '"buddy"', $fs, '"suit"', $fs, '"rating"', $fs, '"visibility"', $fs, '"notes"', $fs, '"weight (kg)"', $fs, '"tags"')"/>
|
||||
<xsl:value-of select="concat('"dive number"', $fs, '"date"', $fs, '"time"', $fs, '"duration (min)"', $fs, '"maxdepth (m)"', $fs, '"avgdepth (m)"', $fs, '"airtemp (C)"', $fs, '"watertemp (C)"', $fs, '"cylinder size (l)"', $fs, '"startpressure (bar)"', $fs, '"endpressure (bar)"', $fs, '"o2 (%)"', $fs, '"he (%)"', $fs, '"location"', $fs, '"gps"', $fs, '"divemaster"', $fs, '"buddy"', $fs, '"suit"', $fs, '"rating"', $fs, '"visibility"', $fs, '"notes"', $fs, '"weight (kg)"', $fs, '"tags"')"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="$fs"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="@duration"/>
|
||||
<xsl:value-of select="substring-before(@duration, ' ')"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="divecomputer[1]/depth/@mean|divecomputer[1]/depth/@max != ''">
|
||||
|
@ -123,11 +123,11 @@
|
|||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="$fs"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="cylinder[1]/@o2"/>
|
||||
<xsl:value-of select="substring-before(cylinder[1]/@o2, '%')"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="$fs"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="cylinder[1]/@he"/>
|
||||
<xsl:value-of select="substring-before(cylinder[1]/@he, '%')"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
@ -310,11 +310,11 @@
|
|||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="$fs"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="@o2"/>
|
||||
<xsl:value-of select="substring-before(@o2, '%')"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="$fs"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
<xsl:value-of select="@he"/>
|
||||
<xsl:value-of select="substring-before(@he, '%')"/>
|
||||
<xsl:text>"</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="location">
|
||||
|
|
Loading…
Add table
Reference in a new issue