From b0a93b23ab954457d0fa2948ddf41b38d428197e Mon Sep 17 00:00:00 2001 From: Lorenz Sieben Date: Mon, 7 Oct 2024 15:08:36 +0200 Subject: [PATCH] Generate inspect-data.json --- .gitignore | 2 +- README.md | 3 +++ datasette/settings.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1362a48..a02e28a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ datasets/*.db data.db - +datasette/inspect-data.json *.db-shm *.db-wal diff --git a/README.md b/README.md index 429341e..7410ba3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ The main database is created dynamically, combining the datasets into a single ` Then, you can run `yarn make-database` to create the database. This will (re-)create and correctly configure `datasette/data.db`. +Generate the cache file by running `cd datasette && datasette inspect data.db --inspect-file=inspect-data.json`. + ## Running Datasette We are using Datasette in [configuration directory mode](https://docs.datasette.io/en/stable/settings.html#configuration-directory-mode), as such you only need to pass that folder to get the correct configuration: @@ -26,6 +28,7 @@ To add a new dataset, you need to: 4. Add the dataset and its metadata to `datasets.json`. 5. Mention the dataset in `datasette/templates/index.html` (in the "Datasets" section). 6. Run `yarn make-database` to recreate the main database. +7. Regenerate the cache file by running `cd datasette && datasette inspect data.db --inspect-file=inspect-data.json`. ## Plugins diff --git a/datasette/settings.json b/datasette/settings.json index e654530..3d8c4ea 100644 --- a/datasette/settings.json +++ b/datasette/settings.json @@ -1,5 +1,6 @@ { "facet_time_limit_ms": 1000, "sql_time_limit_ms": 50000, - "suggest_facets": false + "suggest_facets": false, + "allow_download": true }