aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/outputs/io_out/source_pod.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sisudoc/outputs/io_out/source_pod.d')
-rw-r--r--src/sisudoc/outputs/io_out/source_pod.d35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/sisudoc/outputs/io_out/source_pod.d b/src/sisudoc/outputs/io_out/source_pod.d
index 4730bf2..f6d7765 100644
--- a/src/sisudoc/outputs/io_out/source_pod.d
+++ b/src/sisudoc/outputs/io_out/source_pod.d
@@ -282,19 +282,22 @@ template spinePod() {
writeln("WARNING (io) src out NOT found (abstraction): ", fn_src_in);
}
}
- /+ ↓ the .ocda.db sits beside the pod rather than inside it: it
- carries the images itself, and putting it in the zip would
- store them twice. digested here so that digests.txt covers
- every artefact the pod directory holds for this document
- +/
- {
- string db_filename = _doc_uid_base ~ _lang ~ ".ocda.db";
- string fn_db = pths_pod.pod_dir_() ~ "/" ~ db_filename;
- if (exists(fn_db)) {
- ST_file_stat file_ = getFileStat(fn_db);
- _digests[_lang]["ocda_db"] ~= file_.sha256hash.toHexString
- ~ "::" ~ file_.fileSize.to!string ~ " - " ~ db_filename ~ "\n";
- }
+ }
+ /+ ↓ the .ocda.db sits beside the pod rather than inside it: it
+ carries the images itself, and putting it in the zip would
+ store them twice. digested here so that digests.txt covers
+ every artefact the pod directory holds for this document.
+ One database holds every language of the document, so it is
+ digested once, when the last language has been written into
+ it, and listed as shared rather than per language.
+ +/
+ {
+ string db_filename = doc_matters.src.doc_uid_out_no_lang ~ ".ocda.db";
+ string fn_db = pths_pod.pod_dir_() ~ "/" ~ db_filename;
+ if (exists(fn_db)) {
+ ST_file_stat file_ = getFileStat(fn_db);
+ _digests["shared"]["ocda_db"] ~= file_.sha256hash.toHexString
+ ~ "::" ~ file_.fileSize.to!string ~ " - " ~ db_filename ~ "\n";
}
}
}
@@ -699,12 +702,12 @@ template spinePod() {
if (("ssp" in _digests[_lang]) && (_digests[_lang]["ssp"].length > 0)) {
f.writeln(_digests[_lang]["ssp"].strip);
}
- if (("ocda_db" in _digests[_lang]) && (_digests[_lang]["ocda_db"].length > 0)) {
- f.writeln(_digests[_lang]["ocda_db"].strip);
- }
}
}
if ("shared" in _digests) {
+ if (("ocda_db" in _digests["shared"]) && (_digests["shared"]["ocda_db"].length > 0)) {
+ f.writeln(_digests["shared"]["ocda_db"].strip);
+ }
if (("images" in _digests["shared"]) && (_digests["shared"]["images"].length > 0)) {
// if (doc_matters.opt.action.vox_gt_2) { writeln(_digests["shared"]["images"]); }
f.writeln(_digests["shared"]["images"]);