diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2024-06-29 13:54:28 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2024-06-29 15:39:08 -0400 |
commit | 860b894a10f3526e6bd73d53850764c0ad95ab99 (patch) | |
tree | e4a997fcacd3b2dcbff876479ebd1ee718230f1e /src/sisudoc/meta/metadoc_from_src_functions.d | |
parent | nix minor (diff) |
document digests and reduction in use of tuples
Diffstat (limited to 'src/sisudoc/meta/metadoc_from_src_functions.d')
-rw-r--r-- | src/sisudoc/meta/metadoc_from_src_functions.d | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/sisudoc/meta/metadoc_from_src_functions.d b/src/sisudoc/meta/metadoc_from_src_functions.d index 29e675c..b5956c0 100644 --- a/src/sisudoc/meta/metadoc_from_src_functions.d +++ b/src/sisudoc/meta/metadoc_from_src_functions.d @@ -54,18 +54,6 @@ module sisudoc.meta.metadoc_from_src_functions; @safe: template docAbstractionFunctions() { // ↓ 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; @@ -2998,6 +2986,19 @@ template docAbstractionFunctions() { return obj; } // ↑ - object tags + // ↓ - 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 // ↓ - table of contents @system ObjGenericComposite[] backmatter_gather_table_of_contents( ObjGenericComposite[] the_document_endnotes_section, |