aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/meta/metadoc_from_src_functions.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sisudoc/meta/metadoc_from_src_functions.d')
-rw-r--r--src/sisudoc/meta/metadoc_from_src_functions.d25
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,