dogsheep / healthkit-to-sqlite

Convert an Apple Healthkit export zip to a SQLite database
https://datasette.io/tools/healthkit-to-sqlite
Apache License 2.0
191 stars 9 forks source link

Import workouts #2

Closed simonw closed 4 years ago

simonw commented 4 years ago

From #1

simonw commented 4 years ago
 'Workout': {'attr_counts': {'creationDate': 663,
                             'device': 230,
                             'duration': 663,
                             'durationUnit': 663,
                             'endDate': 663,
                             'sourceName': 663,
                             'sourceVersion': 663,
                             'startDate': 663,
                             'totalDistance': 663,
                             'totalDistanceUnit': 663,
                             'totalEnergyBurned': 663,
                             'totalEnergyBurnedUnit': 663,
                             'workoutActivityType': 663},
             'child_counts': {'MetadataEntry': 1928,
                              'WorkoutEvent': 2094,
                              'WorkoutRoute': 340},
             'count': 663,
             'parent_counts': {'HealthData': 663}},
 'WorkoutEvent': {'attr_counts': {'date': 2094,
                                  'duration': 837,
                                  'durationUnit': 837,
                                  'type': 2094},
                  'child_counts': {},
                  'count': 2094,
                  'parent_counts': {'Workout': 2094}},
 'WorkoutRoute': {'attr_counts': {'creationDate': 340,
                                  'endDate': 340,
                                  'sourceName': 340,
                                  'sourceVersion': 340,
                                  'startDate': 340},
                  'child_counts': {'Location': 398683, 'MetadataEntry': 546},
                  'count': 340,
                  'parent_counts': {'Workout': 340}}}