<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sisudoc-spine/src/sisudoc/ocda/abstraction/doc_from_artefact.d, branch main</title>
<subtitle>SiSU Spine: document publishing and search (in D) 2015</subtitle>
<link rel='alternate' type='text/html' href='https://doc-reform.org/projects/sisudoc-spine/'/>
<entry>
<title>org files mostly headers</title>
<updated>2026-10-25T00:45:37+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-10-24T22:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://doc-reform.org/projects/sisudoc-spine/commit/?id=2a55a61d10739e782a82fcb438607e552148fbd9'/>
<id>2a55a61d10739e782a82fcb438607e552148fbd9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>read: db names outputs from manifest carried</title>
<updated>2026-09-22T21:24:13+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-09-21T19:52:16+00:00</published>
<link rel='alternate' type='text/html' href='https://doc-reform.org/projects/sisudoc-spine/commit/?id=0fb266da0aa1925700f2685057fcd3b0711e4733'/>
<id>0fb266da0aa1925700f2685057fcd3b0711e4733</id>
<content type='text'>
ensure that db uses the names it carries in manifest which produce
deterministic output (and fix divergence in db rendering of output
names, (which previously also looked for variable input from the
environment))

Output built from a database with --config naming the site configuration
is now byte identical to output built from the pod, on the render route
as it already was on the materialise route.

(assisted by Claude-Code)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ensure that db uses the names it carries in manifest which produce
deterministic output (and fix divergence in db rendering of output
names, (which previously also looked for variable input from the
environment))

Output built from a database with --config naming the site configuration
is now byte identical to output built from the pod, on the render route
as it already was on the materialise route.

(assisted by Claude-Code)
</pre>
</div>
</content>
</entry>
<entry>
<title>ocda.db: read a document language of a database</title>
<updated>2026-09-22T18:54:32+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-09-21T15:42:42+00:00</published>
<link rel='alternate' type='text/html' href='https://doc-reform.org/projects/sisudoc-spine/commit/?id=3f87aa600b5080135557d846ee1ba7daef9d3155'/>
<id>3f87aa600b5080135557d846ee1ba7daef9d3155</id>
<content type='text'>
A database now holds every language of its document, so reading one
means naming a language. Three small pieces:

- spineDbLanguages says what languages a file holds. Its own template
  rather than part of the reader (asking a file what it holds does not
  instantiate the object setter and the markup regexes with it).

- abstractionLoad and spineDocFromArtefact take a language and pass it
  to dbReadFile, which resolves it to a doc_id, takes that language
  document where there is one, and lists the languages and stops where
  there is a choice.

- spineArtefactLanguages turns an artefact into the documents to build:
  one for a .ssp, and for a database the languages it holds filtered by
  --lang. The artefact loop then has a language loop inside it, so a
  single .ocda.db argument builds every language, as the pod it came
  from would.

--db-round-trip takes --lang for the same reason, and  ocda-db looses
--parallel (would cause a race).

(assisted by Claude-Code)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A database now holds every language of its document, so reading one
means naming a language. Three small pieces:

- spineDbLanguages says what languages a file holds. Its own template
  rather than part of the reader (asking a file what it holds does not
  instantiate the object setter and the markup regexes with it).

- abstractionLoad and spineDocFromArtefact take a language and pass it
  to dbReadFile, which resolves it to a doc_id, takes that language
  document where there is one, and lists the languages and stops where
  there is a choice.

- spineArtefactLanguages turns an artefact into the documents to build:
  one for a .ssp, and for a database the languages it holds filtered by
  --lang. The artefact loop then has a language loop inside it, so a
  single .ocda.db argument builds every language, as the pod it came
  from would.

--db-round-trip takes --lang for the same reason, and  ocda-db looses
--parallel (would cause a race).

(assisted by Claude-Code)
</pre>
</div>
</content>
</entry>
<entry>
<title>ocda db: before writing check carried file names</title>
<updated>2026-09-22T16:02:31+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-09-21T03:37:45+00:00</published>
<link rel='alternate' type='text/html' href='https://doc-reform.org/projects/sisudoc-spine/commit/?id=0e60ccbeeeb6848d571c4caa78850022a9487288'/>
<id>0e60ccbeeeb6848d571c4caa78850022a9487288</id>
<content type='text'>
bugfix: content image names are now checked in a pass of their own,
before anything is created or written, and one bad name refuses every
image in the artefact rather than skipping the one, which is what the
zip reader does with a zip. The write then re-checks containment.

(prior to this an image name read out of a .ocda.db was written without
checks, and such a database can be fetched over https. A name could
climb with "..", and being handed to chainPath an absolute name dropped
everything before it, so "/x" did not land under the image directory at
all. The zip reader has guarded against this since it was written; the
database reader did not).

carried_names.d holds both rules: a bare filename, as an image is
carried, and a relative path, for the markup and conf a database is to
carry.

(assisted by Claude-Code)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bugfix: content image names are now checked in a pass of their own,
before anything is created or written, and one bad name refuses every
image in the artefact rather than skipping the one, which is what the
zip reader does with a zip. The write then re-checks containment.

(prior to this an image name read out of a .ocda.db was written without
checks, and such a database can be fetched over https. A name could
climb with "..", and being handed to chainPath an absolute name dropped
everything before it, so "/x" did not land under the image directory at
all. The zip reader has guarded against this since it was written; the
database reader did not).

carried_names.d holds both rules: a bare filename, as an image is
carried, and a relative path, for the markup and conf a database is to
carry.

(assisted by Claude-Code)
</pre>
</div>
</content>
</entry>
<entry>
<title>ocda: the images an artefact carries, and the ones it only describes</title>
<updated>2026-09-12T16:14:39+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-09-11T18:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://doc-reform.org/projects/sisudoc-spine/commit/?id=5ba5620bf9b3c0f42a8ac6aeccf7c93ee6329fc4'/>
<id>5ba5620bf9b3c0f42a8ac6aeccf7c93ee6329fc4</id>
<content type='text'>
The document markup sample collection builds byte identically from
either artefact: 1457 files, no differences, from markup, from the 35
.ssp files, and from the 35 .ocda.db files.

A .ocda.db carries its images as blobs. dbReadFiles() reads them and
they are written where the output writers look for images: a
directory of this run's making, removed when the run ends, not the
pod beside the artefact, (which could be a working published tree). The
document's source path moves with it, image_dir_path being reached from
the document's own file rather than from the pod.

Each blob is checked against the sha256 the database recorded beside it.
The two were written together, so a mismatch means the file is damaged.
(the point of having recorded the digest).

A .ssp only describes its images, so those are the ones in the pod it
sits in, and they are checked against the digests it recorded.

That asymmetry arises from of what the two artefacts are: the ocda.db is
self-sufficient and can prove it is looking at the right image, the .ssp
describes a pod it sits alongside.

Found while wiring it: setting the pod directory alone was not enough,
since image_dir_path is derived from the source file's path
(../../image from media/text/&lt;lang&gt;/), so the source path has to be
moved with it.

(assisted by Claude-Code)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The document markup sample collection builds byte identically from
either artefact: 1457 files, no differences, from markup, from the 35
.ssp files, and from the 35 .ocda.db files.

A .ocda.db carries its images as blobs. dbReadFiles() reads them and
they are written where the output writers look for images: a
directory of this run's making, removed when the run ends, not the
pod beside the artefact, (which could be a working published tree). The
document's source path moves with it, image_dir_path being reached from
the document's own file rather than from the pod.

Each blob is checked against the sha256 the database recorded beside it.
The two were written together, so a mismatch means the file is damaged.
(the point of having recorded the digest).

A .ssp only describes its images, so those are the ones in the pod it
sits in, and they are checked against the digests it recorded.

That asymmetry arises from of what the two artefacts are: the ocda.db is
self-sufficient and can prove it is looking at the right image, the .ssp
describes a pod it sits alongside.

Found while wiring it: setting the pod directory alone was not enough,
since image_dir_path is derived from the source file's path
(../../image from media/text/&lt;lang&gt;/), so the source path has to be
moved with it.

(assisted by Claude-Code)
</pre>
</div>
</content>
</entry>
<entry>
<title>spine: process a document from .ocda.db or .ssp</title>
<updated>2026-09-12T16:14:39+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-09-11T17:57:47+00:00</published>
<link rel='alternate' type='text/html' href='https://doc-reform.org/projects/sisudoc-spine/commit/?id=f41bf1cc525c70cced764a5e4df70d499d82f9c9'/>
<id>f41bf1cc525c70cced764a5e4df70d499d82f9c9</id>
<content type='text'>
Process a document from its .ocda.db or .ssp abstraction. A .ssp or a
.ocda.db given as an argument is now a document like any other: read
rather than parsed, and handed to the output writers as the same doc
they already take.

The 35 document sample collection built from its .ssp files is byte
identical to the same collection built from markup: 1457 files, no
differences.

Three things had to be rebuilt rather than read, all of them a value
parsed rather than a structure derived:

- classify_topic_register_arr and its expanded twin. The split is not a
  plain one, so the rule moved to sisudoc.ocda.meta.topic_register and
  both the yaml reader and this one call it.
- creator_author_arr, which is creator.author split on the ", " it was
  joined with.
- title_sub, a copy of title_subtitle made where the header is read, and
  what epub3 puts in dc:title id="subtitle".

Fixed ordering bug found by the acceptance test. A heading's own anchor
can be a bare number taken from its text and this can collide with the
ocn of an unrelated object. Whole output comparison found that before
the fix there was one wrong link in one epub's table of contents.

From a .ocda.db, 1446 of 1457 files are identical. The 11 that are not
are the images: a database carries its own image blobs and nothing yet
extracts them, so the five sisu_markup images are not copied and the
epub that embeds them differs. That is the next step and is not a defect
in this one.

--source and --pod2 are refused with a warning rather than half
done, no artefact carrying the markup.

(assisted by Claude-Code)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Process a document from its .ocda.db or .ssp abstraction. A .ssp or a
.ocda.db given as an argument is now a document like any other: read
rather than parsed, and handed to the output writers as the same doc
they already take.

The 35 document sample collection built from its .ssp files is byte
identical to the same collection built from markup: 1457 files, no
differences.

Three things had to be rebuilt rather than read, all of them a value
parsed rather than a structure derived:

- classify_topic_register_arr and its expanded twin. The split is not a
  plain one, so the rule moved to sisudoc.ocda.meta.topic_register and
  both the yaml reader and this one call it.
- creator_author_arr, which is creator.author split on the ", " it was
  joined with.
- title_sub, a copy of title_subtitle made where the header is read, and
  what epub3 puts in dc:title id="subtitle".

Fixed ordering bug found by the acceptance test. A heading's own anchor
can be a bare number taken from its text and this can collide with the
ocn of an unrelated object. Whole output comparison found that before
the fix there was one wrong link in one epub's table of contents.

From a .ocda.db, 1446 of 1457 files are identical. The 11 that are not
are the images: a database carries its own image blobs and nothing yet
extracts them, so the five sisu_markup images are not copied and the
epub that embeds them differs. That is the next step and is not a defect
in this one.

--source and --pod2 are refused with a warning rather than half
done, no artefact carrying the markup.

(assisted by Claude-Code)
</pre>
</div>
</content>
</entry>
</feed>
