Crates.io | tcx |
lib.rs | tcx |
version | 0.9.3 |
source | src |
created_at | 2021-03-23 21:08:01.803015 |
updated_at | 2021-10-18 14:33:20.303727 |
description | Reads TCX (Garmin Training Center Database XML) files |
homepage | |
repository | https://github.com/msimms/rust_tcx |
max_upload_size | |
id | 372721 |
size | 2,249,972 |
Training Center XML (TCX) parser written in Rust. TCX is an XML-based file format that is used for exchanging fitness tracking information from runs, bike rides, etc. It builds on Rust's serde deserialization framework.
use tcx;
use std::io::BufReader;
use std::fs::File;
fn main() {
let result = crate::tcx::read_file("tests/20210119_run_garmin_fenix6.tcx");
let activities = result.activities.unwrap();
for activity in activities.activities {
for lap in activity.laps {
for track in lap.tracks {
for trackpoint in track.trackpoints {
...
}
}
}
}
}
It is currently able to parse several example TCX files, specifically ones for running and cycling activities, but does not implement the entire specification.
This project is licensed under the MIT license.