diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-30 17:01:14 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-01 10:00:42 -0400 |
| commit | 7a6d7e3bc332230b5dff4962f10a5c6776b0c97b (patch) | |
| tree | 8ceba54b0c058a88bb406ca3164fb9f614c90dcb | |
| parent | title is h1 class "heading title", sized above h1 (diff) | |
metadata page: reporting digests only provide link
fix issue with reporting of multi-lingual document digests
Set as with the .ocda.db digest taken off this page on 2026-09-18,
and the same remedy: the page links <doc>.digests.txt, where each
digest is taken once, of the finished file, and quotes none itself.
single-language documents lose a line that was right, but for
multi-language documents the last language in the run was missing here,
and this cannot go wrong again.
(assisted by Claude-Code)
| -rw-r--r-- | org/out_metadata.org | 27 | ||||
| -rw-r--r-- | src/sisudoc/outputs/io_out/metadata.d | 27 |
2 files changed, 16 insertions, 38 deletions
diff --git a/org/out_metadata.org b/org/out_metadata.org index c868bad..d61e3df 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -204,25 +204,14 @@ if (doc_matters.opt.action.html_link_markup_source) { metadata_ ~= "<p class=\"lev1\">● source digests:" ~ " [ <a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".digests.txt\" class=\"lnkizipcon\">" ~ " # digests </a>]</p>"; - auto pths_pod = spinePathsPods!()(doc_matters); - auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; - if (doc_matters.opt.action.pod) { - try { // get sha digest for pod - metadata_ ~= "<p class=\"lev2\">"; - auto data = (cast(byte[]) (fn_pod).read); // prevents code from being safe - metadata_ ~= "<tt>" ~ data.sha256Of.toHexString ~ "::" ~ data.length.to!string ~ "</tt> - " ~ doc_matters.src.filename_base ~ pod_archive_suffix; - metadata_ ~= "</p>"; - } catch (Exception ex) { - writeln("WARNING, source doc_matters.src.filename_base not found: ", doc_matters.src.filename_base, pod_archive_suffix, "\n ", fn_pod); - } - } - /+ ↓ no digest for the .ocda.db here. - One database holds every language of the document and is added to - once per language, so at the time this page is written for a given - language the file is in general not finished: a digest taken here - would be a digest of a file that no longer exists by the end of - the run. The digest is taken once, when the database is complete, - and recorded in <doc>.digests.txt, which is linked above. + /+ ↓ no digest for the .sisupod or the .ocda.db here. + One archive and one database holds every language of the document, and + each is rewritten or added to once per language, so at the time this page + is written for a given language neither is in general finished: a digest + taken here would be a digest of a file that no longer exists by the end + of the run. Each digest is taken once, when its file is complete, and + recorded in <doc>.digests.txt, which is linked above: the page names + where the digests are rather than quoting one that may be stale. +/ } if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) { diff --git a/src/sisudoc/outputs/io_out/metadata.d b/src/sisudoc/outputs/io_out/metadata.d index 6b08bd7..2d70259 100644 --- a/src/sisudoc/outputs/io_out/metadata.d +++ b/src/sisudoc/outputs/io_out/metadata.d @@ -538,25 +538,14 @@ string theme_light_1 = format(q"┃ metadata_ ~= "<p class=\"lev1\">● source digests:" ~ " [ <a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".digests.txt\" class=\"lnkizipcon\">" ~ " # digests </a>]</p>"; - auto pths_pod = spinePathsPods!()(doc_matters); - auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; - if (doc_matters.opt.action.pod) { - try { // get sha digest for pod - metadata_ ~= "<p class=\"lev2\">"; - auto data = (cast(byte[]) (fn_pod).read); // prevents code from being safe - metadata_ ~= "<tt>" ~ data.sha256Of.toHexString ~ "::" ~ data.length.to!string ~ "</tt> - " ~ doc_matters.src.filename_base ~ pod_archive_suffix; - metadata_ ~= "</p>"; - } catch (Exception ex) { - writeln("WARNING, source doc_matters.src.filename_base not found: ", doc_matters.src.filename_base, pod_archive_suffix, "\n ", fn_pod); - } - } - /+ ↓ no digest for the .ocda.db here. - One database holds every language of the document and is added to - once per language, so at the time this page is written for a given - language the file is in general not finished: a digest taken here - would be a digest of a file that no longer exists by the end of - the run. The digest is taken once, when the database is complete, - and recorded in <doc>.digests.txt, which is linked above. + /+ ↓ no digest for the .sisupod or the .ocda.db here. + One archive and one database holds every language of the document, and + each is rewritten or added to once per language, so at the time this page + is written for a given language neither is in general finished: a digest + taken here would be a digest of a file that no longer exists by the end + of the run. Each digest is taken once, when its file is complete, and + recorded in <doc>.digests.txt, which is linked above: the page names + where the digests are rather than quoting one that may be stale. +/ } if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) { |
