Saturday, November 6, 2010

Exporting Runkeeper Data



Runkeeper.com is one of the most well known website for tracking one's running, cycling etc. They have a wonderful website with charts and lots of interesting features. But as I mentioned here, I needed to export data from runkeeper and that is when I wrote a python script to download runkeeper data which I can import to dailymile.com.


If you need to export your data from runkeeper.com, you may use it too. This code comes with absolutely zero warranty. You may use it for your personal use. You can download  this script (runkeeper.py) from here.


This script can be executed by using following command
            ./runkeeper.py runkeeperUserId filename.csv
where runkeeperuserId is your Runkeeper User Id and filename is any name of any file where you want to store your activities.


Update December 10th 2010: 
----------------------------------------------------------------------------------
Now you can even download your private activities (along with your public activities) with a new script. You can download this script (runkeeper_wPrivAct.py) from here


This script can be executed by using following command
            ./runkeeper_wPrivAct.py emailId filename.csv
where emailId is your email id associated to runkeeper and filename is name of any file where you want to store your activities.


You will need to enter your runkeeper password when asked for. Please note that entering email id and password is as safe as entering on runkeeper website. This script doesn't store or send your password anywhere except using it to log you onto runkeeper website to download your data.. 
--------------------------------------------------------------------------------


These script will produce a comma separated text file in following format:


If you find any problem / bug / issue, please let me know. I will be glad to help.  Please feel free to mail me at tachniki@gmail.com

8 comments:

  1. Thank you so much !
    This is awesome. A fear of losing my history has now passed.

    Run on!
    ~ Sean

    ReplyDelete
  2. Thanks Sean for appreciating.

    Happy Running!!!
    Nitin

    ReplyDelete
  3. I may be a bit of a neophyte, but how do you execute your script? Is it command line or from within a program?

    ReplyDelete
  4. Hi RRHS,

    You will need to have python run time installed in your system. You must install lxml library for python. Then you will be able to run this from command line. On linux, mac it can be executed directly using
    ./runkeeper.py runkeeperUserId filename.csv

    On Windows, you can execute by using command
    python runkeeper.py runkeeperUserId filename.csv

    If you are unable to run, just send me you runkeeper id (not email id) to tachniki@gmail.com. I will send you your csv file.

    ReplyDelete
  5. worked great--thanks for the assist

    ReplyDelete
  6. @RRHS glad that it worked.

    Good luck for all your fitness activities.

    ReplyDelete
  7. Hi Nitin,
    Trying to run my first python script. Happy to have installed lxml but keep getting a syntax error problem:

    SyntaxError: invalid syntax
    >>> Users/matthew/Desktop/runkeeper_wPrivAct.py littlesparky dailymile.csv
    File "", line 1
    Users/matthew/Desktop/runkeeper_wPrivAct.py littlesparky dailymile.csv

    Any suggestions? Thanks!

    ReplyDelete
  8. Sorry Sparky. I missed to see this comment earlier. Are you running this from python command prompt? Can you run it just using unix / linux / windows command prompt?

    ReplyDelete