Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neighborhood999/gpx
Strava GPX parser written in Go.
https://github.com/neighborhood999/gpx
go gpx running strava
Last synced: 19 days ago
JSON representation
Strava GPX parser written in Go.
- Host: GitHub
- URL: https://github.com/neighborhood999/gpx
- Owner: neighborhood999
- License: mit
- Created: 2020-01-09T04:02:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-16T00:16:17.000Z (over 4 years ago)
- Last Synced: 2024-10-28T05:35:58.864Z (2 months ago)
- Topics: go, gpx, running, strava
- Language: Go
- Homepage:
- Size: 31.3 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
Awesome Lists containing this project
README
# gpx
A simple gpx parser (support Strava currently) for running and written in Go.
## Installation
```sh
$ make install
```## Tests
```sh
$ make test
```## Usage
```go
package mainimport (
"bytes"
"fmt"
"io/ioutil"
"os""github.com/neighborhood999/gpx"
)func main() {
f, err := os.Open("running.gpx")if err != nil {
fmt.Println(err)
}defer f.Close()
b, _ := ioutil.ReadAll(f)
g, _ := gpx.ReadGPX(bytes.NewReader(b))fmt.Println(g.Distance()) // Get the total running distance
fmt.Println(g.Duration()) // Get the total running duration
fmt.Println(g.PaceInKM()) // Get the running pace(km/min)
}
```## LICENSE
MIT © [Peng Jie](https://github.com/neighborhood999/)