aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ocda_functions.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2024-07-04 11:37:18 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2024-07-04 11:37:24 -0400
commitd7e7c79253697a7b34df04f547c70669acb67ea1 (patch)
tree55c1fd75ff17de8776599fc633ef71c3648353a1 /org/ocda_functions.org
parentmarkup source digest to metadata.html (diff)
[fn].digest.txt, sha256 of pod source files & pod
Diffstat (limited to 'org/ocda_functions.org')
-rw-r--r--org/ocda_functions.org33
1 files changed, 28 insertions, 5 deletions
diff --git a/org/ocda_functions.org b/org/ocda_functions.org
index ecc8b2f..070b842 100644
--- a/org/ocda_functions.org
+++ b/org/ocda_functions.org
@@ -3197,16 +3197,39 @@ pure ObjGenericComposite obj_dom_set_collapsed_tags()(
#+NAME: ocdaFunc_obj_digest
#+HEADER: :noweb yes
#+BEGIN_SRC d
+<<ocdaFunc_obj_digest_return>>
+#+END_SRC
+
+****** return object digest
+
+#+NAME: ocdaFunc_obj_digest_return
+#+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
+
+****** screen show/debug object digest
+
+#+NAME: ocdaFunc_obj_digest_debug
+#+HEADER: :noweb yes
+#+BEGIN_SRC d
+// ↓ - object digest
+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