aboutsummaryrefslogtreecommitdiffstats
path: root/xslt/divelogs.xslt
AgeCommit message (Collapse)Author
2014-10-12Support for importing additional tanksGravatar Miika Turkia
This patch adds support for importing additional cylinders from divelogs.de. This also adds support for He on the import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-17Do not add unnecessary / at end of location on divelogs importGravatar Miika Turkia
The check if both location and site exist was flawed causing an extra slash on location name when the SITE was empty. Thus resulting in multiple location candidates when exporting to divelogs.de and re-importing to Subsurface. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-16Only print separator when really needed on importGravatar Miika Turkia
The separator was printed if SITE had data, even if LOCATION was empty. Now print the separator only if both of these contain data. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-15Support divelogs.de exports that include Cyrillic charactersGravatar Miika Turkia
divelogs.de sends us XML files that explicitly state that they are in ISO-8859-1 encoding (which is true). These files contain the HTML encoded Cyrillic characters. Once we decode those characters the resulting file is actually UTF-8 encoded (which is a superset of ISO-8859-1). That seriously confuses libxml when it tries to parse things. So instead recognize divelogs.de files and skip the encoding declaration for them before decoding the HTML encoded non-ISO-8859-1 characters. This does show, however, that divelogs.de incorrectly truncates the encoded strings (at least in some sample data that I created the parsing throws errors because of that). Reported-by: Sergey Starosek <sergey.starosek@gmail.com> Based-on-code-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-08Identify converted files as importedGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-07Fix import when locale set to decimal commaGravatar Miika Turkia
This should take care of locale caused problems when the input uses decimal point but locale uses decimal comma. Also the sample I have of Suunto DM3 format weight is represented with comma instead of dot so converting that as well. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-20Divelogs.de import empty value fixGravatar Miika Turkia
This checks that weight and dive durantion are defined before importing. (Empty value concatenated with unit gives an error on import.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-20Import divelogs.deGravatar Miika Turkia
This XSLT converts divelogs.de logs into Subsurface format. Data that is discarded: weather, water visibility, boat name. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>