gpx2kml is a library for combining gpx files exported from Runkeeper to kml files. Below is a screenshot of the generated kml file in Google Earth.

Runkeeper is one of many mobile apps that can track exercises. Usually they provide UI for displaying individual activity (like biking, running, etc.) with route map and statistics, and the functionality to bulk export archive files.
gpx2kml can combine all the gpx files exported from Runkeeper into a single kml file so that it can be displayed in the Google Earth. The motivation is mainly to prepare data for my bike journey webpage.
I use Runkeeper to track my biking and walking activities. Tracking is a long term activity, so file generation and archive is an incremental process.
I export the gpx files once per month, and generate kml files from the gpx files with the format YYYY-MM.kml. After that, all the kml files are combined into a single kml file, usually named after the city or the event related with those activities.
Run the interactive command and choose tasks from a terminal menu.
Without uv:
pip install gpx2kml
gpx2kml
With uv (no global installation required):
uvx gpx2kml
- Accumulate a few activities using Runkeeper.
- Export the acitives from the Runkeeper web UI and download the file. The demo folder provides a sample zip file.
- Open a terminal, and change the working directory to the one that contains the zip file.
- Select menu option 1 to archive GPX files from a Runkeeper export zip. This creates an archive folder.
- Select menu option 2 to generate monthly KML files. This creates a kml folder with YYYY-MM.kml files.
- Move the kml files into kml/XXX, then select menu option 3 and input XXX to combine them into XXX.kml.
Other than running the commands in the terminal, there is a demo.py that demonstrates how to call the methods in a python file.