From 860b894a10f3526e6bd73d53850764c0ad95ab99 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 29 Jun 2024 13:54:28 -0400 Subject: document digests and reduction in use of tuples --- org/ocda_functions.org | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'org/ocda_functions.org') diff --git a/org/ocda_functions.org b/org/ocda_functions.org index 6c300f1..ecc8b2f 100644 --- a/org/ocda_functions.org +++ b/org/ocda_functions.org @@ -47,18 +47,6 @@ template docSectKeysSeq() { #+HEADER: :noweb yes #+BEGIN_SRC d // ↓ abstraction imports -import - std.algorithm, - std.container, - std.file, - std.json, - std.path; -import - sisudoc.meta, - sisudoc.meta.defaults, - sisudoc.meta.rgx, - sisudoc.meta.metadoc_object_setter, - sisudoc.meta.rgx; // ↓ abstraction mixins mixin ObjectSetter; mixin InternalMarkup; @@ -126,6 +114,7 @@ auto node_construct = NodeStructureMetadata(); <> <> <> +<> <> <> <> @@ -3203,6 +3192,26 @@ pure ObjGenericComposite obj_dom_set_collapsed_tags()( // ↑ - object tags #+END_SRC +***** ϝ object digest + +#+NAME: ocdaFunc_obj_digest +#+HEADER: :noweb yes +#+BEGIN_SRC d +// ↓ - object digest +pure ubyte[32] obj_digest()( + ObjGenericComposite obj, +) { + obj.metainfo.sha256 = obj.text.sha256Of; + // if (obj.metainfo.is_a == "heading") { + // writeln(obj.metainfo.sha256.toHexString, " ", obj.metainfo.ocn, " ", obj.metainfo.is_a, " ", obj.metainfo.heading_lev_markup); + // } else { + // writeln(obj.metainfo.sha256.toHexString, " ", obj.metainfo.ocn, " ", obj.metainfo.is_a); + // } + return obj.metainfo.sha256; +} +// ↑ - object digest +#+END_SRC + **** ϝ section ***** ϝ section toc - table of contents -- cgit v1.2.3