aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ocda_functions.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/ocda_functions.org')
-rw-r--r--org/ocda_functions.org33
1 files changed, 21 insertions, 12 deletions
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();
<<ocdaFunc_obj_inline_markup>>
<<ocdaFunc_obj_attributes>>
<<ocdaFunc_obj_set_markup_level_tags>>
+<<ocdaFunc_obj_digest>>
<<ocdaFunc_section_toc>>
<<ocdaFunc_section_endnotes>>
<<ocdaFunc_section_book_index>>
@@ -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