Open simonw opened 3 years ago
Obviously this should be a plugin. Maybe I invent a plugin hook that is defined in datasette-app-support and specifies "I can accept a file, add me as a named menu item somewhere"?
Then the plugin itself could fire up a subprocess that runs the existing tool (no need to even rewrite it) and attaches the resulting database to the interface.
It could even proxy through the progress bar from the CLI tool.
Finally... the on boarding flow could offer this as an inviting illustrated icon as part of the default homepage - "Got an Apple Watch? Explore your health data in Datasette.. Get started" - which shows some documentation and offers a button to install the plugin.
The easiest way to do this will be to Run the existing CLI tool in a subprocess, managed by a new Datasette plugin.
This could take advantage of a new plugin hook offered by datasette-app-support
which provides access to a native file open shortcut of some kind.
I'd love to start mixing the Dogsheep family of tools with Datasette Desktop to make them more accessible to a much wider audience.
I think https://datasette.io/tools/healthkit-to-sqlite is the perfect starting point because it has so little configuration - no need for API keys or anything like that, it just needs the path to a HealthKit export zip file on disk.