| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Four things in the abstraction are open ended lists that a single
row cannot hold, and which the database therefore could not
express at all: a paragraph's extracted links, its anchor tags, a
heading's lev4 subtoc entries, and the image records. Each now has
a table keyed on the object, ordered by seq:
object_images, object_links, object_anchors, object_subtoc
And the images themselves are carried in the file, in a files
table with role, name, bytes, sha256, pixel size and the blob. The
point is self-sufficiency: html copies every image into its output
tree, epub and odt place them in their zips, and xelatex reads
them from disk, so an abstraction without the bytes cannot produce
a document, only its text and structure. The table is deliberately
generic rather than an images feature, so that the same mechanism
can later carry the source .sst or the pod's configuration by
adding a row with another role, and so that a reader can ask
whether a database carries its images (select count(*) from files
where role='image') and fall back to a directory beside it when
the answer is zero.
Bytes are stored exactly as read and the digest is taken over them.
Only images the document references are carried: the sisu manual's
media/image holds 10 files and 5 are in its image list, so 5 are
stored.
(assisted by Claude-Code)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added the structure ocda was extended to compute as JSON arrays
(a column each).
JSON arrays, allows SQL can reach inside them
(with CHECK(json_valid()) on each)
select ocn from objects where json_extract(ancestors,'$[4]') = 9;
select ocn from objects where json_array_length(children) > 3;
ancestors and table_widths change format for this reason; nothing
outside spine reads the file yet, and metadata now records what it is:
schema.name, schema.version, source.filename, source.language.
INTEGER PRIMARY KEY in place of AUTOINCREMENT, which was paying
for a guarantee not needed here and creating sqlite_sequence, and
UNIQUE(section, seq), which is the table's actual key.
Note for anyone editing this file: the schema is a D string handed to
sqlite, so comments inside it must be SQL comments. A D /+ +/ comment
there aborts the statement and leaves the table missing, silently.
(assisted by Claude-Code)
|
| |
|
|
|
|
|
|
|
|
| |
drop WAL so the file can be read read-only: journal_mode=WAL was
set in the file header and A WAL database cannot be opened by a
reader that cannot also write beside it (this ruled out a
read-only directory, read-only media, and anything that wants to
read the artefact where it sits).
(assisted by Claude-Code)
|
| |
|
|
|
|
|
| |
remove four dead fields, two of them serialised, none of the
them were assigned (or called for reading).
(assisted by Claude-Code)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
fix to --abstraction/.ssp: fix document structure, representation
parent, ancestors, children. Make parent_ocn, the marked-up and
collapsed ancestor arrays, and the children correctly represent
the document structure. fixed
(assisted by Claude-Code)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01836BxBb8LvVKJ8sBg7Dx6U
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Modules and imports rewritten to sisudoc.ocda.* and
sisudoc.outputs.*; dub.json excludedSourceFiles and the
spine:abstraction sub-package sourcePaths collapsed to
./src/sisudoc/ocda.
Verified: nix build .#spine-overlay-ldc clean.
(assisted by Claude-Code)
|
|
|
create new directories under ./src/sisudoc ocda & outputs in order to
separate the document abstraction library from downstream output
processing (stuff broken till paths & modules fixed)
|