Inspired by christianewald/runtastic-export-all-activities.md. Thank you!
Major problem of the original solution above is that it opens "Save as" dialog for each file.
Yes, it can be by-passed if you set up a browser to automatically save the file (it's set up by default).
But I don't like it.
I've improved the solution:
- All files are downloaded into memory (it can take hundreds of MBs).
- Then added to in-memory ZIP archive (https://github.com/Stuk/jszip).
- Finally, the ZIP archive is opened for "Save as" (https://github.com/eligrey/FileSaver.js).
Open runtastic.com in your browser and log in.
Then Go To the page Activites
(in my case and my language https://www.runtastic.com/cs/uzivatele/jaroslav-hranicka/sportovni-aktivity ).
Open browser's Developers Console
(in Chrome hit CTRL + Shift + I).
Type this script into the opened Console:
var downloadAll = function () {
var zip = new JSZip();
$.each(index_data, function (i, value) {
var url = 'https://' + app_config.domain + user.run_sessions_path + value[0] + '.gpx';
var filename = 'RUNTASTIC-' + value[1] + '-' + value[0] + '.gpx';
$.ajax({
url: url,
async: false,
dataType: 'xml',
success: function(data, textStatus, jqXHR) {
zip.file(filename, jqXHR.responseText);
console.log('Added ' + url);
}
});
});
console.log('OK, ZIP is being generated...');
saveAs(zip.generate({type:'blob'}), 'runtastic.zip');
console.log('Done.');
};
var loadScript = function (src, onload) {
var script = document.createElement('script');
script.src = src;
script.onload = onload;
document.head.appendChild(script);
};
loadScript(
'https://rawgit.com/Stuk/jszip/master/dist/jszip.min.js',
loadScript('https://rawgit.com/eligrey/FileSaver.js/master/FileSaver.min.js', downloadAll)
);
And wait until the ZIP with all activities is offered to "Save as"...
Have a nice day!
Use tapiriik.com! It's super easy.
You can connect eg. Endomondo + Dropbox. Then you upload your .GPX from Runtastic into Dropbox > Apps > tapiriik
and click sync in tapiriik.com.
For more information, visit https://support.endomondo.com/hc/en-us/articles/213703847-File-Import
how do I use JSZip while being in the console?