aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
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 /org
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 'org')
-rw-r--r--org/in_source_files.org17
-rw-r--r--org/out_metadata.org14
2 files changed, 27 insertions, 4 deletions
diff --git a/org/in_source_files.org b/org/in_source_files.org
index 2f12196..6c6fd2c 100644
--- a/org/in_source_files.org
+++ b/org/in_source_files.org
@@ -1333,6 +1333,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/org/out_metadata.org b/org/out_metadata.org
index 19bc02e..2e411ca 100644
--- a/org/out_metadata.org
+++ b/org/out_metadata.org
@@ -176,10 +176,16 @@ if (doc_matters.opt.action.html_link_markup_source) {
~ "&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>";