| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The database's rows now carry data-indent= rather than a bare indent=,
and <code> rather than the obsolete <tt>, because the cgi renders those
rows into html where neither of the old forms is valid. The stylesheet
here holds its own copy of the rule, so it follows:
p[indent="h0i0"] -> p[data-indent="h0i0"] (100 selectors)
tt { ... } -> code { ... }
This is paired with the sisudoc-spine commit "epub, html, db: use of
elements & attributes, fix". Either alone loses the indent styling of
search results.
(assisted by Claude-Code)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow a db path from the environment, and refuse what it cannot read
Three changes related to opening the database:
- provide an environment override for the db path: SPINE_SEARCH_DB_PATH
overrides the compiled-in db_sqlite_path, beside the other
environment.get calls. Path was the one setting without an override,
(SERVER_NAME, REQUEST_SCHEME, SCRIPT_NAME, QUERY_STRING could come
from the environment). This adds consistency and makes testing the
search form database builds easier (as it no longer requires
rebuilding the binary with a patched configuration for readily
accessible db path)
- selected_db is required to be a plain filename within the configured
directory, the database is opened read only, and a database that is
not there is named rather than created.
- The form now reads PRAGMA user_version, as stamped by spine, and
refuses a database built to another schema version, naming both
versions and the two commands that rebuild it. A database carrying
neither of the tables it joins is refused the same way.
sqlite_db_schema_version_- is expected and has to be in sync/step with
the sqlite_db_schema_version in
sisudoc-spine src/sisudoc/outputs/io_out/sqlite.d; the two tests added
there under test/ check that they agree.
(assisted by Claude-Code)
|