Git Product home page Git Product logo

rust_tcx's Introduction

crates.io

tcx

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.

Example

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 {
                    ...
                }
            }
        }
    }
}

Current Status

It is currently able to parse several example TCX files, specifically ones for running and cycling activities, but does not implement the entire specification.

Revision History

  • 0.9.3 - Exposed all enums and structs with documentation. Added some traits to make life easier.
  • 0.9.2 - Changed the return type so that the error is being passed back to the caller.
  • 0.9.1 - Added ability to read speed and power data from the extensions field, also flushed out more structures from the specification.
  • 0.9.0 - Initial release. Successfully parsed a few example files from Garmin Connect, but does not yet implement the entire specification.

License

This project is licensed under the MIT license.

rust_tcx's People

Contributors

evensolberg avatar msimms avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

piotrek124-1

rust_tcx's Issues

write TCX

It would be great if we could have the functionality to write TCX.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.