Giter Site home page Giter Site logo

mapmyrun2gpx's Introduction

mapmyrun2gpx

Converts mapmyrun workout data to a GPX formatted file - Linux only, tested on Debian.

This is a VERY SIMPLISTIC implementation of getting your precious workout data from mapmyrun with all the timings.

Motivation

I'm moving from mapmyrun to Strava and want to take my data with me and import it - after all, it's mine (I did all the running!). Unfortunately mapmyrun only gives you access to the route data, not how you ran it.

Read the whole story here: http://www.chrisramsay.co.uk/posts/2014/10/moving-from-mapmyrun-to-strava/

What does it do?

It makes a request to a workout page, as identified by its ID, and scrapes a JSON request for building the maps. It then takes the start time of the workout and uses that as a baseline for populating the rest of the GPX data.

Once done it drops the GPX data into a file named 'workout_ID'.gpx in the output directory done.

How to run it

NOTE: In order for this script to access your workout data you must make sure that each workout is set to be accessible publically. That's done by selecting the 'world' button on the top right hand toolbar of the workout view.

Just find the workout IDs of the workouts you want GPX data for. That ID is present in the URL, for example: http://www.mapmyrun.com/workout/123456789. Add one or more at the end of the getmmr2gpx.py file thus:

    if __name__ == '__main__':

        # Chuck 'em in here at will!
        process('123456788')
        process('123456789')

Add as many as you like in the code above - it will chew though them all, leaving you a load of *.gpx files in the output directory. When you're ready just run it:

$ python getmmr2gpx.py

It either prints 'Error!' or 'Done!' once per call to process() - that's either a pass or a fail, respectively.

Requirements

Just run:

$ pip install -r requirements.txt

Please note that (on Debian/Ubuntu) lxml has certain requirements best addressed by running the following beforehand:

$ apt-get install libxml2-dev libxslt-dev python-dev

Regarding other Linuxes, please google or whatever.

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.