This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Default)] | |
struct Bools(bool); | |
impl Iterator for Bools { | |
type Item = bool; | |
fn next(&mut self) -> Option<Self::Item> { | |
let value = self.0; | |
Some(std::mem::replace(&mut self.0, !value)) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate chrono; | |
extern crate rustfit; | |
//use chrono::{TimeZone, Utc}; | |
use std::convert::TryFrom; | |
use std::io::prelude::*; | |
//const FIT_TS_OFFSET: u32 = 631065600; | |
trait ToBytes { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
## | |
## Concatenate track segments of multiple .gpx files into one. | |
## | |
## Usage: python concatgpx.py [input1] [input2] [...] > [output] | |
## | |
## If the first .gpx file contains more than one <trkseg>, then the output file will contain a <trk> element | |
## with multiple <trkseg> child elements appended from the subsequent input files. If there is only a single | |
## <trkseg> element in the first input file, then the output file will contain a <trk> element with a single | |
## <trkseg> element containing all the <trkpt> elements from the subsequent input files. |