<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sisudoc-spine/org/out_src_abstraction_sqlite_db.org, branch main</title>
<subtitle>SiSU Spine: document publishing and search (in D) 2015</subtitle>
<link rel='alternate' type='text/html' href='https://amissah.com/projects/sisudoc-spine/'/>
<entry>
<title>org headers rearranged (&amp; odd hilighting issue)</title>
<updated>2026-05-04T16:12:12+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-05-04T15:46:57+00:00</published>
<link rel='alternate' type='text/html' href='https://amissah.com/projects/sisudoc-spine/commit/?id=c81bb010f45b732f97d7fbecd812ecae28f2be7d'/>
<id>c81bb010f45b732f97d7fbecd812ecae28f2be7d</id>
<content type='text'>
- odd hilighting issue ... must result from my org config, but "fix"
  makes things easier for me.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- odd hilighting issue ... must result from my org config, but "fix"
  makes things easier for me.
</pre>
</div>
</content>
</entry>
<entry>
<title>document abstraction as per document sqlite db</title>
<updated>2026-04-23T00:42:31+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-04-22T17:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://amissah.com/projects/sisudoc-spine/commit/?id=51549f11d60cd353564486b3598e69259fb01b66'/>
<id>51549f11d60cd353564486b3598e69259fb01b66</id>
<content type='text'>
  --show-abstraction-db flag to write per-document

- SQLite database of document abstraction
  (Claude-Code primary assist)

- Add a new output mode that serializes the in-memory document
  abstraction to a per-document SQLite database. This complements
  the .ssp text format (--show-abstraction) with a queryable
  database representation of the same data.

- Schema:
    metadata table - key/value pairs for document metadata
      (title, creator, dates, rights, classify, identifiers,
      language, notes, make settings, doc_has counts)
    objects table - one row per document object with columns:
      section, seq (position within section), ocn, is_a,
      is_of_part, is_of_type, heading_level, identifier,
      parent_ocn, last_descendant_ocn, ancestors,
      indent/bullet/lang, has_* flags, segment/anchor tags,
      table/code properties, text content
    Indexed on: section, ocn, parent_ocn, is_a, heading_level

- Uses prepared statements via d2sqlite3 (existing dependency)
  for safe and efficient insertion. Each document produces a
  standalone .abstraction.db file in the abstraction/ output
  directory.

- New files:
    src/sisudoc/io_out/create_abstraction_db.d
      Follows the same pattern as create_abstraction_txt.d.
      Creates schema, populates metadata via key/value inserts,
      then iterates all sections writing objects with prepared
      statements within a single transaction.

- Changes to spine.d:
    - Add "show-abstraction-db" to opts init, getopt, OptActions
    - Add to abstraction(), require_processing_files(), and
      meta_processing_general() gates
    - Insert call at both spineAbstraction sites

- Tested against all 35 sample documents (including 9-language
  live-manual) - zero failures. Works standalone or combined
  with --show-abstraction and other output flags.

- Example queries the database supports:
    SELECT ocn, heading_level, text FROM objects
      WHERE is_a = 'heading' AND section = 'body';
    SELECT * FROM objects WHERE parent_ocn = 10;
    SELECT key, value FROM metadata WHERE key LIKE 'title.%';

  Co-Authored-By: Anthropic Claude Opus 4.6 (1M context)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  --show-abstraction-db flag to write per-document

- SQLite database of document abstraction
  (Claude-Code primary assist)

- Add a new output mode that serializes the in-memory document
  abstraction to a per-document SQLite database. This complements
  the .ssp text format (--show-abstraction) with a queryable
  database representation of the same data.

- Schema:
    metadata table - key/value pairs for document metadata
      (title, creator, dates, rights, classify, identifiers,
      language, notes, make settings, doc_has counts)
    objects table - one row per document object with columns:
      section, seq (position within section), ocn, is_a,
      is_of_part, is_of_type, heading_level, identifier,
      parent_ocn, last_descendant_ocn, ancestors,
      indent/bullet/lang, has_* flags, segment/anchor tags,
      table/code properties, text content
    Indexed on: section, ocn, parent_ocn, is_a, heading_level

- Uses prepared statements via d2sqlite3 (existing dependency)
  for safe and efficient insertion. Each document produces a
  standalone .abstraction.db file in the abstraction/ output
  directory.

- New files:
    src/sisudoc/io_out/create_abstraction_db.d
      Follows the same pattern as create_abstraction_txt.d.
      Creates schema, populates metadata via key/value inserts,
      then iterates all sections writing objects with prepared
      statements within a single transaction.

- Changes to spine.d:
    - Add "show-abstraction-db" to opts init, getopt, OptActions
    - Add to abstraction(), require_processing_files(), and
      meta_processing_general() gates
    - Insert call at both spineAbstraction sites

- Tested against all 35 sample documents (including 9-language
  live-manual) - zero failures. Works standalone or combined
  with --show-abstraction and other output flags.

- Example queries the database supports:
    SELECT ocn, heading_level, text FROM objects
      WHERE is_a = 'heading' AND section = 'body';
    SELECT * FROM objects WHERE parent_ocn = 10;
    SELECT key, value FROM metadata WHERE key LIKE 'title.%';

  Co-Authored-By: Anthropic Claude Opus 4.6 (1M context)
</pre>
</div>
</content>
</entry>
</feed>
