aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/ocda/abstraction/ssp.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-08-26 22:41:06 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-08-28 10:01:18 -0400
commit8e7a8996944f80ca7e05d743b33deb1ac233f74f (patch)
tree0481181ac87eedd22395e94ac25d0e3e0821f533 /src/sisudoc/ocda/abstraction/ssp.d
parent.ssp: image as repeatable self-describing property (diff)
.ssp digests: report missing or unreadable image
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)
Diffstat (limited to 'src/sisudoc/ocda/abstraction/ssp.d')
-rw-r--r--src/sisudoc/ocda/abstraction/ssp.d5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sisudoc/ocda/abstraction/ssp.d b/src/sisudoc/ocda/abstraction/ssp.d
index 95f7fda..ea76d71 100644
--- a/src/sisudoc/ocda/abstraction/ssp.d
+++ b/src/sisudoc/ocda/abstraction/ssp.d
@@ -293,7 +293,10 @@ template spineAbstractionTxt() {
+/
if (obj.metainfo.sha256.images.length > 0) {
foreach (i; obj.metainfo.sha256.images) {
- output ~= ".image: " ~ i.fileName
+ output ~= (i.fileMissing)
+ ? ".image: " ~ i.fileName
+ ~ " missing:true"
+ : ".image: " ~ i.fileName
~ " sha256:" ~ i.fileHash_sha256.toHexString.to!string
~ " bytes:" ~ i.fileSize.to!string;
}