Tool for analyzing exported Runtastic / Adidas Running data and importing into a workout-tracker database.
Disclaimer: This software is not affiliated with Runtastic GmbH, Adidas AG or workout-tracker.
- RuntasticAnalyzer:
- Processes your downloaded Runtastic data
- Generates simple overviews of your workout session data and shoes/equipment with customizable metadata information
- Restructures and renames the GPX files of the workout sessions
- WorkoutTracker:
- Can be used both for existing workout-tracker databases and completely new setups
- Adds manual workouts without GPX tracks to the workout-tracker database
- Renames workout sessions according to the Runtastic activity notes
- Adds comment blocks with Runtastic metadata, such as burned calories, surface information, weather conditions, and heart rate data
- Matches Runtastic shoes with workout-tracker equipment items
- Go to the Runtastic website and log in
- Navigate to Account & Data and click Export Data
- After some time, you should receive an email with the download link to your data
- Clone this repository
- Download the Runtastic data export, unzip the file, and move its contents into the
runtastic_export
folder of this repository.Note: The relevant data is now located in
runtastic_export/Sport-sessions
andruntastic_export/User
. - Run
python src/main.py
Simple overviews about your workout sessions can be found in the statistics/*.txt
files.
Investigate the tables to see if all data was parsed correctly.
Further columns can be added if the relevant data exists in the Runtastic data export, such as:
- Burned calories
- Elevation data
- Surface information
- Weather conditions
- Heart rate data
- Comments
Optional: Edit the relevant functions of the RuntasticAnalyzer class to customize the columns as desired:
print_shoe_statistics
print_sessions_with_gpx
print_sessions_without_gpx
The GPX files of your workout sessions can be found in the gpx_restructured
folder and are structured by:
- Sports/activity types
- Shoes/equipment
The names of the GPX files consist of:
- Activity start date
- Sports/activity type
- Shoe/equipment
- Workout session notes
While there is basic handling of special characters for renaming the GPX files, I'm sure not all cases are covered.
Optional: Edit the
export_gpx_data
function of the RuntasticAnalyzer class to change this structure or naming of GPX files, or to handle additional special characters and strings.
The notes stored in the Runtastic workout sessions will be exported to the Note/Title column of the metadata/runtastic_out.csv
file.
For batch editing, duplicate this file, rename it to runtastic_edit.csv
, and modify its content as required.
Do not edit
runtastic_out.csv
directly as this file will be overwritten the next time you start this tool.
Per default, all session notes will be used as workout titles when importing into workout-tracker (see below).
Thereby, column Note/Title of runtastic_edit.csv
will be used as title, and column Comment will be imported as comment.
Additionally, a text block containing Runtastic metadata (such as burned calories, weather data, etc.) will be added to the end of the comments field of the workout-tracker sessions.
The following describes a suggested workflow for importing all Runtastic workout sessions into workout-tracker. Before importing data in workout-tracker, follow the steps above for downloading your Runtastic data and verifying that the workout sessions are parsed correctly.
Ensure that you make a backup of your workout-tracker database before using this tool!
As the import process depends on your individual requirements, you may want to deviate from this workflow. It is recommended to make a backup of the database after each of the following sections so that you can quickly undo database changes. To verify each step, you can replace the database in the workout-tracker folder and re-start the program.
While not required, it may be helpful to use an external SQLite reader to verify the modifications in the database. For debugging purposes, you may want to replace
log.setLevel("INFO")
bylog.setLevel("DEBUG")
in log_config.py
- If you want to create a completely new workout-tracker database:
- Start workout-tracker to create a new database
- Use the interface to add your individual user(s)
- If you already have a workout-tracker database:
- Ensure that you make a backup of your workout-tracker database! Store it in a completely different folder or machine to ensure it's not overwritten.
- If you want to import new GPX data into the workout-tracker database:
- Use the workout-tracker interface to add new workout sessions by importing the GPX files. The import of multiple files at once is supported.
The metadata of the workout sessions will be overwritten later. During the GPX import, you can force a certain activity type, e.g., one that you usually do not use. This helps in identifying workouts which have been updated by this tool.
- If you want to track sports equipment / shoes:
- Use the workout-tracker interface to create new equipment items (if you have not already created them before)
- Ensure that you are using the same name as used in your Runtastic export (column Name in
statistics/table_shoes.txt
)
You can change the name of the equipment items later, but identical names are required for matching Runtastic shoes and workout-tracker equipment.
- Stop workout-tracker and copy the database to
database/database.db
in this repository - At this point, it is recommended to create a backup of
database.db
so that you can quickly undo changes by restoring the database file.
For the following steps, you need to edit the main.py file to interact with the database. Ideally, you just need to comment/uncomment certain lines. Refer to the comments in main.py for more information.
- Uncomment the lines for interacting with the workout-tracker database
- Optional: You may want to disable the statistics evaluation and GPX restructuring to increase execution speed
- Optional: For database debugging, uncomment the lines at the end of the file
- Run
python src/main.py
to see if the database is read correctly - Write your workout-tracker username into
workout-tracker_user.txt
.To view all users, run this tool with database debugging lines enabled in main.py.
- Edit main.py and uncomment the lines for adding manual workouts without GPX files
- Run
python src/main.py
and watch for warnings/errors. Repeatedly running the program should work without creating duplicate workout session entries.
- Edit main.py and uncomment the lines for updating the metadata information of the workout sessions
- Run
python src/main.py
and watch for warnings/errors - Optional: You can use the database debugging lines at the end of main.py to print all workouts. Verify if the workout names/titles and activity types have been set correctly.
- Optional: Edit workouttracker_sport_activities.py for defining the matching behavior between Runtastic and workout-tracker activity types. Run the tool again after changing this mapping file.
- Edit main.py and uncomment the lines for linking equipment items to workout sessions
- Run
python src/main.py
and watch for warnings/errors - Workout sessions without assigned Runtastic shoes will be exported to
metadata/workout-tracker_equipment_out.csv
. - Duplicate this file, rename it to
metadata/workout-tracker_equipment_edit.csv
and enter the name of the shoes in the Equipment column. Ensure that you are using the same name as used in your Runtastic export (column Name instatistics/table_shoes.txt
)Do not edit
workout-tracker_equipment_out.csv
directly as this file will be overwritten the next time you start this tool. - After editing
workout-tracker_equipment_edit.csv
, run this tool againNote that the CSV file lists missing shoes in the Runtastic data export, not missing equipment in the workout-tracker database. Running this tool again will not lead to a change in
workout-tracker_equipment_out.csv
. Once you define an equipment and run this tool again, the equipment will be linked correctly in the database, else you will receive a warning/error.
- Stop workout-tracker
- Ensure that you make a backup of your current workout-tracker database!
- Replace the workout-tracker database by the
database/database.db
file of this repository - Restart workout-tracker
- Verify that all data is correct. For example, check the following:
- Workout session titles
- Sports/activity types
- Runtastic metadata block in the comments
- Linked equipment items
- Number of workouts assigned to each equipment