Closed GoogleCodeExporter closed 8 years ago
Sorry I didn't test it on Mac (I'm not the creator of the ambit2gpx script by
the way, just a guy who uses it and happens to be in software!). I suspect
there's something different about the file extension handling on Mac and it's
trying to process it like the old XML format. The output should be like this:
> $ python ambit2gpx.py 46B2095118000200-2014-08-25T08_53_11-0.sml
> Parsing file 46B2095118000200-2014-08-25T08_53_11-0.sml
> Done.
> Creating file 46B2095118000200-2014-08-25T08_53_11-0.gpx
> ...................
> Done.
and create the attached file.
If you add the following at line 244
print "extension is {0}".format(ext)
and run the script again, it should also output:
> extension is .sml
Original comment by mr.greg...@gmail.com
on 26 Aug 2014 at 11:59
Attachments:
I've got a working version for Mac against Moveslink 1.2.9.
I worked against the "6e58fb0e0e61 Adds simple support for Moveslink 1.2.8 but
removes support for earlier versions." in mr.gregson's clone. Same principle.
I will have broken support for earlier versions and probably non-Mac but the
change points in the right direction.
diff ...ambit2gpx-1.2.8.py ambit2gpx-1.2.9osx.py
182,183c182 # I get to the DeviceLog tag directly below, so I don't do this
relative navigation - PC 20140909
< deviceLog = childElements(root)[0]
< for node in childElements(deviceLog):
---
> for node in childElements(root):
242c241 # self explanatory
< filename += ".xml"
---
> filename += ".sml"
246a246 # It works with this kept in from the prior version - not tested
without it so may not be necessary - PC 20140909
> file.readline() # Skip first line
253c254 # without mucking about I just get the "DeviceLog" tag and go from
there. this ends up in self.__root - PC 20140909
< top = doc.getElementsByTagName('sml')
---
> top = doc.getElementsByTagName('DeviceLog')
Original comment by peterjnc...@gmail.com
on 9 Sep 2014 at 7:00
I'm handling currently duplicate issues #7 & #8.
Original comment by jconr...@gmail.com
on 21 Dec 2014 at 10:28
Original issue reported on code.google.com by
sportmg...@gmail.com
on 25 Aug 2014 at 2:51Attachments: