sports tracker export all workouts in gpx formatAlmost all sport tracking sites do not have "Export all" functionality. They want you to stay with them as long as possible. The same with Sports Tracker. There is no such functionality on their website, you can export workouts only one by one (which is annoying).

But with a bit of JS magic, we can download all workouts in GPX format.

  1. Login at http://www.sports-tracker.com/
  2. Go to http://www.sports-tracker.com/diary/workout-list
  3. Click "Show more" button at the end of the page until you have all workouts loaded.
  4. Go to developer console (press Ctrl + Shift + I in Google Chrome)
  5. Insert following JS and press Enter:
var items = $("ul.workouts li a");

var key = "sessionkey=";
var valueStartIndex = document.cookie.indexOf(key) + key.length;
var token = document.cookie.substring(valueStartIndex, document.cookie.indexOf(';', valueStartIndex));

$('body').html('');

$.each(items,function(i, value)
{
    var href = $(value).attr("href");
    var id = href.substr(href.lastIndexOf('/') + 1, 24);
    var url = 'http://www.sports-tracker.com/apiserver/v1/workout/exportGpx/' + id + '?token=' + token;
    var filename = 'SportsTracker-' + id + '.gpx';
    $.ajax({
        url: url,
        success: function(data, textStatus, jqXHR)
        {
            if(textStatus == 'success')
            {
                $('<a/>', {
                    'href' : 'data:text/plain;charset=utf-8,' + encodeURIComponent(jqXHR.responseText),
                    'download' : filename,
                    'id' : id
                }).html(filename)
                .before(i + '. Downloaded: ')
                .after('<br/>')
                .prependTo('body');

                $('#' + id)[0].click();
            }
            else
            {
                console.log(textStatus);
            }
        },
        dataType: 'xml'
    });
});

All gpx files will be in Download folder.