Crates.io | healthkit-to-sqlite-cli |
lib.rs | healthkit-to-sqlite-cli |
version | 0.0.4 |
source | src |
created_at | 2022-12-31 05:16:02.380684 |
updated_at | 2022-12-31 07:33:30.169655 |
description | Command-line tool to convert Apple HealthKit data to a SQLite database. |
homepage | https://github.com/jshrake/healthkit-to-sqlite |
repository | https://github.com/jshrake/healthkit-to-sqlite |
max_upload_size | |
id | 748250 |
size | 414,286 |
Command-line tool to convert Apple HealthKit data to a SQLite database.
cargo install healthkit-to-sqlite-cli
healthkit-to-sqlite export.zip sqlite://healthkit.db
You can use https://datasette.io/ to view and explore the resulting SQLite database file. Install the https://datasette.io/plugins/datasette-geojson-map plugin to visualize the workout routes data on a map.
datasette install datasette-geojson-map
datasette healthkit.db
Record
, Workout
, and ActivitySummary
elements are currently exported.Record
elements are inserted to a table with a name matching the value of the element's type
attribute.Workout
elements are inserted to a table named "Workout".
workoutEvent
and workoutStatistics
elements are represented as JSON columns.workoutRoute
element is converted to a GeoJSON LineString and stored in a JSON column named "geometry" for easy integration with https://datasette.io/plugins/datasette-geojson-map.datasette healthkit.db --setting truncate_cells_html 40
. Note that this setting does not appear to be compatible with the datasette-pretty-json plugin.ActivitySummary
elements are inserted as rows to a table named "ActivitySummary".Record
elements must have a type
attribute.Workout
elements must have a workoutActivity
attribute.MetadataEntry
elements must have key
and value
attributes.FileReference
elements must have a path
attribute.