simonw / datasette-app

The Datasette macOS application
https://datasette.io/desktop
121 stars 8 forks source link

Mechanism for plugins that need a specific DB #137

Open simonw opened 2 years ago

simonw commented 2 years ago

datasette-tiddlywiki and datasette-notebook are examples if plugins that only work if they have a particular DB file they can read and write.

In Datasette Desktop they won't start working until you've remembered to attach those DBs, and you need to do that every time you restart the app!

Need a less clunky mechanism for this.

See also Twitter: https://twitter.com/simonw/status/1481165965815541760

simonw commented 2 years ago

This may need a new plugin hook, to allow those plugins to express their needs.

Perhaps the files get created automatically in a sensible location somewhere? But where?

simonw commented 2 years ago

Solving this would unlock all kinds of exciting new plugin concepts. A Datasette TODO list for example.

simonw commented 2 years ago

I could use this pattern in datasette-app-support to add a new plugin hook that those plugins could use to indicate that they need their own database created.

https://til.simonwillison.net/datasette/register-new-plugin-hooks