From c6e822e3ce4b096163e0016e5735ef9c16e8997f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 8 Sep 2026 18:44:45 -0400 Subject: html metadata: a link to the ocda.db The metadata page gains a line between the markup source and the source digests. (assisted by Claude-Code) --- src/sisudoc/ocda/abstraction/load.d | 17 +++++++++++++++++ src/sisudoc/outputs/io_out/metadata.d | 14 ++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sisudoc/ocda/abstraction/load.d b/src/sisudoc/ocda/abstraction/load.d index f429595..ebdd1a5 100644 --- a/src/sisudoc/ocda/abstraction/load.d +++ b/src/sisudoc/ocda/abstraction/load.d @@ -61,6 +61,23 @@ module sisudoc.ocda.abstraction.load; .ssp + images the abstraction, as text .ocda.db the abstraction, sqlite, images inside + A source may also be remote. spine already takes a URL argument ending + in .zip: it is downloaded to a temp file (downloadZipUrl in + ocda/io_in/read_zip_pod.d, guarded by rgx_url_zip and by --allow- + downloads) and the local path is processed in its place. The same should + be offered for .ocda.db, which is the one other artefact that is + self-sufficient enough to be fetched on its own: it carries its images. + What that needs is small and is not done here: + + - rgx_url_zip is `^https?://...[.]zip$`; a sibling pattern for + `[.]ocda[.]db$`, or one pattern covering both + - the same download path, which is already generic apart from that + regex, and the same temp-file cleanup + - dispatch, which this module already does once the file is local + + A .ssp URL would want its images too, so it is a pod or a database that + travels, not a .ssp on its own. + This module names those sources, tells them apart, and loads the two that are self-describing artefacts, returning the value the parser produces. diff --git a/src/sisudoc/outputs/io_out/metadata.d b/src/sisudoc/outputs/io_out/metadata.d index 853fb83..1634b9a 100644 --- a/src/sisudoc/outputs/io_out/metadata.d +++ b/src/sisudoc/outputs/io_out/metadata.d @@ -510,10 +510,16 @@ string theme_light_1 = format(q"┃ ~ " 🫛 zipped | " ~ "" ~ " 🫛 tree ] "; - /+ .ssp peg parsable source, interesting (path may be of interest for downloading) but renders poorly visually in browser +/ - // metadata_ ~= "

●  .ssp [peg parsable source]:" - // ~ "" - // ~ " 🗎 .ssp [peg parsable source] ]

"; + { + auto pths_pod_ = spinePathsPods!()(doc_matters); + string _db_name = doc_matters.src.doc_uid_out ~ ".ocda.db"; + string _db_fn = pths_pod_.pod_dir_() ~ "/" ~ _db_name; + if (doc_matters.opt.action.ocda_db && _db_fn.exists) { + metadata_ ~= "

●  document abstraction:" + ~ " [" + ~ " 🫛 ocda.db ]

"; + } + } metadata_ ~= "

●  source digests:" ~ " [ " ~ " # digests ]

"; -- cgit v1.2.3