aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
AgeCommit message (Collapse)Author
2015-02-11UDDF Export: Moved equipmentused to informationbeforedive section as per ↵Gravatar Martin Long
updated spec Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11UDDF Export: Moved tankdata before samples, as expected in xsd definition.Gravatar Martin Long
Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01Count the UDDF samples in different namespacesGravatar Miika Turkia
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-01-31Should use the common GetFieldByIndex on importGravatar Miika Turkia
Should have removed the getFieldByIndex template from these files when it was moved to commonTemplates. Otherwise these imports wont work. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-29Export cylinder information to divelogs.de also if pressure droppedGravatar Miika Turkia
This will export the cylinder information to divelogs.de also if there is a pressure drop of at least 5 bars. (Previously only a gas switch to the gas triggered the export of that particular cylinder.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26Use the get field template from common templatesGravatar Miika Turkia
Implementation of getFieldByIndex on this file does not support quotation so lets use a template that is developed further. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26Move getFieldByIndex template to common templatesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26Update header to use sample wording on CSV exportGravatar Miika Turkia
The profile export now uses Sample time, etc. on profile export as that is the naming we use on import as well. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25Support for AM/PM time format on manual CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25Import quoted strings from the end of line properlyGravatar Miika Turkia
We need a special case to import tags on our own CSV export as there is no field separator at the end of the line. See #814 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Fix detection of numeric fieldGravatar Miika Turkia
Discarding header lines was faulty as the test whether dive number was numeric did not work properly. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Improve detection of continuation lines in CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Switching to tab delimited CSV exportGravatar Miika Turkia
Use tab as separator when exporting dive details to CSV file. This also replaces tabs and line feeds from notes with spaces. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-23Fix quoted CSV importGravatar Miika Turkia
I am a bit baffled as to how this used to work before and does not work anymore. Anyway, it should be sufficient that we take the quoted text without verifying that the next character is the field separator. (Of course it would be better to make sure field separator follows, as then quotation marks could be used in the free-form texts.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-23Have Sensus samples inside divecomputer tagGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22Improve testing whether we have temp and depth infoGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06Add missing divemaster field to the manual importGravatar Dirk Hohndel
No idea why I didn't notice earlier that this was missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Indentation fix for Subsurface CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Support for multi-line notes on SubsurfaceCSV importGravatar Miika Turkia
This patch only implements the feature, indentation fix is to follow. This ensures that the actual change can be more easily reviewed. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Add required empty fields on CSV exportGravatar Miika Turkia
We need to have empty field printed for every value on the CSV export. Hopefully this is enough. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-31Export only profile from first divecomputerGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-31Imperial support for CSV profile exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-31Include cylinder description for imperial importGravatar Miika Turkia
If the cylinder size seems to be in the form of ALxx, LPxx, or HPxx use that as cylinder description. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-31Imperial support for CSV details exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-31Change the XSLT to use the duration format instead of "logic"Gravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-31Treat duration as minutes if dive would be shortGravatar Miika Turkia
This will read duration from CSV in minutes if the dive would be less than 10 minutes when treating the duration as seconds. In practice, this means that free-divers cannot import dive duration properly from CSV, but this should be sensible for scuba divers. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-31Support importing quoted multi-line notes fieldGravatar Miika Turkia
This adds support for importing multi-line notes field on CSV import. Naturally the notes filed must be quoted with " in this case. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-30Guess imperial cylinder sizes on CSV importGravatar Miika Turkia
This patch uses pre-defined working pressures on cylinders to roughly calculate the size in liters. Imperial selection is ignored here as we can use the prefix to detect if the value seems like imperial unit (and the type of cylinder varies based on location, not divers preference in unit). Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-30Allow unit selection on known CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Preconfigured import of Subsurface CSV log fileGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Include tags on CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Export total weight on CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Store more cylinder information on manual CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-26Save info only from first cylinder on CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Support quoting strings with "" on manual CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Include some empty fields if they are not availableGravatar Miika Turkia
If specific value is not available, we need to have an empty value instead. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Include empty location and gps if non is givenGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Take pressure info from first DC on CSV exportGravatar Miika Turkia
Try to grab pressure information from first DC if it is not manually entered. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Take depths from first DC on CSV exportGravatar Miika Turkia
We need to limit the DCs from which we grab the depths. Otherwise, we end up with too many depth values. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22Grab divecomputer/temperature on CSV exportGravatar Miika Turkia
If temperature is recorded by a DC it must be taken from under the divecomputer tag. However, this will prefer the manually written value if such exists. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-21Add second CSV export with dive detailsGravatar Dirk Hohndel
This is intended to export all the details that someone might copy from a paper logbook. We need a matching import template to make this simple. This hasn't been well tested, I'm sure it will break when elements and attributes are missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-20Add cylinder support to manual2xml XSLTGravatar Miika Turkia
This adds support for importing cylinder information from manually kept dive logs. However, this cannot be used before GUI counterpart is added. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-20Add temperature support to manual2xml XSLTGravatar Miika Turkia
This adds support for importing temperatures from manually kept dive logs. However, this cannot be used before GUI counterpart is added. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-20Fix a bug that added 0, 0 as location on manual CSV importGravatar Miika Turkia
The existence of location information was tested incorrectly resulting in erroneously adding these fields if they were not present. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-19Describe cylinder as unknown instead of mix nameGravatar Miika Turkia
Having the mix name like EANX34 as cylinder description was apparently confusing, so switching to 'unknown' instead. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-17Support cylinder information from Xdeep and Diving LogGravatar Miika Turkia
This adds support for importing cylinder information from at least Xdeep and Diving Log v 5.0. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-16Move the samples inside divecomputer tag on UDDF importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-14Fix event/alarm types in UDDF export.Gravatar Martin Long
UDDF only supports a specific set of alarms. Some events also don't map to alarms but map to other types of elements in UDDF. This patch adds a map of the accepted types. Where a map doesn't exist the type will not be mapped to an alarm, the option then remains to map it to another kind of element, in the same way that happened with headings and gas switches. This removes the need for the specific exclusion of heading and gas switch, as they are now simply not included in the map. Signed-off-by: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-14Count the weights properly on UDDF exportGravatar Miika Turkia
Using node() along with the node-set seems to grab the weights properly for me. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Include weight system on uddf importGravatar Miika Turkia
Adjust to UDDF 3.2 specification Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>