aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-08 18:44:45 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-09-09 19:04:06 -0400
commitc6e822e3ce4b096163e0016e5735ef9c16e8997f (patch)
treee1ac0ae768cd04c37644d2cc9183a49f82bb2515 /src/sisudoc
parent--ocda-db replaces --show-abstraction-db (diff)
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)
Diffstat (limited to 'src/sisudoc')
-rw-r--r--src/sisudoc/ocda/abstraction/load.d17
-rw-r--r--src/sisudoc/outputs/io_out/metadata.d14
2 files changed, 27 insertions, 4 deletions
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"┃
~ "&nbsp;🫛&nbsp;zipped&nbsp;</a>|&nbsp;"
~ "<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "/\" class=\"lnkicon\">"
~ "&nbsp;🫛&nbsp;tree&nbsp;</a>]&nbsp;";
- /+ .ssp peg parsable source, interesting (path may be of interest for downloading) but renders poorly visually in browser +/
- // metadata_ ~= "<p class=\"lev1\">●&nbsp;&nbsp;.ssp [peg parsable source]:"
- // ~ "<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "/media/abstraction/" ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.language ~ ".ssp\" class=\"lnkicon\">"
- // ~ "&nbsp;🗎&nbsp;.ssp [peg parsable source]&nbsp;</a>]</p>";
+ {
+ 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_ ~= "<p class=\"lev1\">●&nbsp;&nbsp;document abstraction:"
+ ~ "&nbsp;[<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ _db_name ~ "\" class=\"lnkicon\">"
+ ~ "&nbsp;🫛&nbsp;ocda.db&nbsp;</a>]</p>";
+ }
+ }
metadata_ ~= "<p class=\"lev1\">●&nbsp;&nbsp;source digests:"
~ "&nbsp;[&nbsp;<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".digests.txt\" class=\"lnkizipcon\">"
~ "&nbsp;#&nbsp;digests&nbsp;</a>]</p>";