From d5b9e3609961515cc52bcc5ef070e3b83b473339 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Sun, 1 Jan 2023 16:10:31 +0100 Subject: [PATCH] Include workout statistics --- healthkit_to_sqlite/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/healthkit_to_sqlite/utils.py b/healthkit_to_sqlite/utils.py index b209ac6..f203d7b 100644 --- a/healthkit_to_sqlite/utils.py +++ b/healthkit_to_sqlite/utils.py @@ -54,6 +54,7 @@ def workout_to_db(workout, db, zipfile=None): record["metadata_" + el.attrib["key"]] = el.attrib["value"] # Dump any WorkoutEvent in a nested list for the moment record["workout_events"] = [el.attrib for el in workout.findall("WorkoutEvent")] + record["workout_statistics"] = [el.attrib for el in workout.findall("WorkoutStatistics")] pk = db["workouts"].insert(record, alter=True, hash_id="id").last_pk # Handle embedded WorkoutRoute/Location points points = [