You need a recent installation of python (3.x)
- Install poetry, datasette and its plugins
poetry new calishot
poetry shell
poetry add datasette
poetry add datasette-json-html
poetry add datasette-pretty-json
You can eventually install it with virtualenv/pip if you don't want to use poetry:
python -m venv calishot
. ./calishot/bin/activate
pip install datasette
pip install datasette-json-html
pip install datasette-pretty-json
- Prepare the calishot settings:
Download the sqlite db file to the same directory and then
cat <<EOF > metadata.json
{
"databases": {
"index": {
"tables": {
"summary": {
"sort": "title",
"searchmode": "raw"
}
}
}
}
}
EOF
You can now run a local test:
datasette serve index.db --config sql_time_limit_ms:10000 --config allow_download:off --config max_returned_rows:2000 --config num_sql_threads:10 --metadata met
adata.json
Open your browser to http://localhost:8001/ and check the result.
- Now you're ready to publish :)
Install heroku-cli then :
heroku login
datasette publish heroku index.db -n calishot-3 --install=datasette-json-html --install=datasette-pretty-json --extra-options="--config sql_time_limit_ms:10000 -
-config allow_download:off --config num_sql_threads:10 --config max_returned_rows:500" --metadata metadata.json
Can you please clarify where to get the sqlite db?