run.sh

changeset 0
8e1675826e46
child 2
e245cf75db68
equal deleted inserted replaced
-1:000000000000 0:8e1675826e46
1 #!/bin/bash
2
3 set -xeo pipefail
4
5 python3 tools/prepare_xep_list.py
6 python3 tools/prepare_software_list.py
7 python3 tools/prepare_compliance.py
8
9 lua normalize_json.lua
10
11 sqlite-utils insert xmpp.db xeps db_xeps.json --pk=id
12 sqlite-utils insert xmpp.db software db_software.json --pk=id
13 sqlite-utils insert xmpp.db software_platforms db_software_platforms.json --pk=software_id --pk=platform
14 sqlite-utils insert xmpp.db software_categories db_software_categories.json --pk=software_id --pk=category
15 sqlite-utils insert xmpp.db implementations db_implementations.json --pk=xep_id --pk=software_id
16 sqlite-utils insert xmpp.db compliance_levels db_compliance.json
17 sqlite-utils add-foreign-key xmpp.db implementations xep_id xeps id
18 sqlite-utils add-foreign-key xmpp.db implementations software_id software id
19 sqlite-utils add-foreign-key xmpp.db compliance_levels xep_id xeps id
20 sqlite-utils add-foreign-key xmpp.db software_platforms software_id software id
21 sqlite-utils add-foreign-key xmpp.db software_categories software_id software id
22
23 # Precompute row counts for performance
24 datasette inspect xmpp.db --inspect-file=counts.json
25
26 exec datasette serve -h 0.0.0.0 --metadata metadata.yml -i xmpp.db --inspect-file=counts.json

mercurial