aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/ocda
Commit message (Collapse)AuthorAgeFilesLines
* ocda a fix & ssp code-style use curly bracesRalph Amissah6 days2-72/+147
| | | | | | | | ocda: fixed inverted object_number_off on body paragraphs ssp: make use of curly braces (code-style) (assisted by Claude-Code)
* ocda: bug fix related to dummy headingsRalph Amissah6 days1-0/+1
| | | | | | | | | | | | | | | | | --+# clears dummy_heading_multiple_objects, fixed until fix, following any ---# ... --+# block every ~# object in the document was marked dummy_heading, (and the output generators that honour that flag suppressed its text: so ~# behaved as -#. One line added to correct the --+# branch. ~# suppresses the object's number only, content is still shown. -# is for a heading introduced solely to segment an output: object number suppressed and the heading text omitted from the body where the output format allows, the toc entry kept. Both were already correct in isolation; only the leaked block flag broke ~#. (assisted by Claude-Code)
* abstraction/.ssp: fix doc structure representationRalph Amissah10 days3-55/+158
| | | | | | | | | | | | 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
* .ssp: doc structure related fixes (& to epub toc_nav)Ralph Amissah12 days2-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | for document abstraction and its .ssp output, removed the requirement of including --abstraction & --serial flags to produce correct output (for: .dom_status, .dom_status_collapsed & .last_descendant) - meta_processing_xml_dom() includes show_abstraction, so --pod2 and --show-abstraction run the dom pass; last_descendant is derived from that pass via after_doc_get_descendants() The accumulators are now verified as eight wide locals of docAbstraction(), so each document starts clean and no two threads share one. - bug: the four dom accumulators were template scope (shared) and nine wide, while their end of document reset was eight wide, so the first document of a run differed from the rest and parallel runs raced on one buffer, (which also mis-nested epub toc_nav) test/ reference .ssp regenerated: accelerando only, trailing zero dropped. test-abstraction-ssp.sh now runs parallel and diffs output against a serial run. (assisted by Claude-Code)
* image digest: include headings in image scanRalph Amissah13 days1-17/+21
| | | | | | | | | | | | | | Assumed that headings do not include images, obj_digest() looked for images only in the non-heading branch, however, the markup does not forbid one, and an object type left out of the scan carries neither digest nor .ssp record, silently. Open Issue: image_list, which drives pod bundling and the @doc_has images count, is gathered only from para objects (and only the first image of each), so an image in a heading or in a block body is recorded in the abstraction but not bundled. (assisted by Claude-Code)
* doc_has: count inline links & notes, always 0, fixRalph Amissah13 days1-0/+26
| | | | | | | | | | | | | Count them over the assembled body objects, (the body alone). Previously dochas["inline_links"], ["inline_notes"] and ["inline_notes_star"] were initialised and read but never incremented, so @doc_has reported 0 inline links and 0 notes for every document while the block counters (codeblock, poem, group, block, quote, table) were counted. create_abstraction_db.d records the same values as document metadata. (assisted by Claude-Code)
* has.images: set flag but was not assigned, fixRalph Amissah13 days3-0/+20
| | | | | | | | | | | every object with an .image record should now carry the images flag. Previously DocObj_Has_.images was read but never written anywhere in the tree, so no object carried it: .ssp emitted has_images = 0 for every object of every document. (assisted by Claude-Code)
* image digest: single read, cache file read & hashRalph Amissah13 days2-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | For image digests cache file read & hash, one read per image file Fix issue: images referenced from several objects were read and hashed once per reference. [as an example in the sisu-manual sm_tux.png accounts for 6 of the document's image records (12 across the sample set), each of them a fresh read of the same bytes, and source_pod.d hashes the file again for digests.txt.] Memoise on the full path within safeComputeHashAndSize. static is thread-local in D, so documents processed in parallel each get their own cache and no synchronisation is involved. Files are not expected to change during a run. Output is unchanged: identical .ssp output. (An image that is missing or unreadable now warns once to stdout rather than once per reference). (assisted by Claude-Code)
* .ssp digest: add image file's own pixel dimensionsRalph Amissah13 days3-5/+34
| | | | | | | | | | | | | | | Complete image file digest identity record: add px:<width>x<height> to the .ssp image record, read from the image file header (imageformats.read_image_info, no decode): .image: won_benkler_2_1.png sha256:5BA4...D128 bytes:93861 px:420x342 (The w##h## dimensions in the markup are display dimensions, not the file's: they are author set, or where given as w0h0 are derived by _image_dimensions and capped to a maximum display width, and they become the width/height attributes of the output format image display). (assisted by Claude-Code)
* .ssp digests: report missing or unreadable imageRalph Amissah13 days2-7/+22
| | | | | | | | | | | | | | | | | | | | image digest: record missing or unreadable image, do not abort safeComputeHashAndSize() open image with guard, so a document naming an image absent from media/image/ throws ErrnoException out of the abstraction stage. as with _image_dimensions() (which warns and continues where issue with image) warn to stdout and record the fact in the abstraction: .image: ffa.png missing:true the abstraction would now state that the object embeds an image it could not read, rather than the .ssp resemble one produced from a complete pod. The sha256 summary line marks the same case MISSING OR UNREADABLE. (assisted by Claude-Code)
* .ssp: image as repeatable self-describing propertyRalph Amissah13 days1-26/+14
| | | | | | | | | | | a repeatable record, one line per image, filename first: .image: won_benkler_2_1.png sha256:5BA492C2...D128 bytes:93861 an object embedding more than one image emits more than one .image line. (assisted by Claude-Code)
* sha summary, mostly cosmetic, some work on imagesRalph Amissah2026-08-264-12/+34
|
* digests (sha256) a revisitRalph Amissah2026-07-314-13/+60
|
* digest (sha256) for document root heading (title)Ralph Amissah2026-07-311-0/+3
| | | | | | corrects an omission this hould have been included to start with reference tests texts regenerated
* ocda public surface + dub.json import-path and dyaml cleanupsRalph Amissah2026-05-251-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three small follow-ups to the ocda/outputs split: 1. Add src/sisudoc/ocda/package.d (module sisudoc.ocda) as a 2-line public re-export of sisudoc.ocda.abstraction. Provides downstream consumers with a canonical "import sisudoc.ocda;" entry point and a stable handle for eventual peer-repo packaging of the abstraction library. 2. Fix the D import-path root in dub.json so it matches the declared module names: - spine:abstraction sub-package "importPaths": [ "./src/sisudoc" ] -> [ "./src" ] - main package buildTypes (dmd, ldc2, ldmd2, gdc, gdmd) "-I=src/sisudoc" -> "-I=src" The modules are named sisudoc.ocda.* / sisudoc.outputs.* / sisudoc.* so the filesystem-based resolver needs to see ./src as the root (so <root>/sisudoc/ocda/X.d resolves). 3. Replace dyaml sub-package's destructive preGenerateCommands ("rm -rf ./src/ext_depends/D-YAML/{examples,testsuite}") with declarative excludedSourceFiles globs. The two directories do not exist in the vendored D-YAML tree, so the rm was a no-op in practice; the glob form is defensive (would silently skip them if they were ever re-introduced) and removes the destructive side-effect from every build. (assisted by Claude-Code)
* ocda + outputs split: module/import + dub.json fixupsRalph Amissah2026-05-2523-98/+98
| | | | | | | | | | | 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)
* separate abstraction lib from output processingRalph Amissah2026-05-2523-0/+13905
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)