diff options
author | Ralph Amissah <ralph@amissah.com> | 2018-04-14 16:39:52 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | 479e71e90146b1067120faf489af1b13a5a0cf3d (patch) | |
tree | 5e725994ae345dd89687fae2fe90979eb3cf6f8d /src/sdp/output/source_sisupod.d | |
parent | 0.26.0 sqlite single statement insertion of objects (diff) |
sqlite3 some stuff & rearrange files, dlang, org
Diffstat (limited to 'src/sdp/output/source_sisupod.d')
-rw-r--r-- | src/sdp/output/source_sisupod.d | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/sdp/output/source_sisupod.d b/src/sdp/output/source_sisupod.d index 6c50cf2..50b37b0 100644 --- a/src/sdp/output/source_sisupod.d +++ b/src/sdp/output/source_sisupod.d @@ -77,7 +77,7 @@ template SiSUpod() { ~ "/" ~ image; if (exists(fn_src_in)) { debug(io) { - writeln("WARNING (io debug) src out found: ", fn_src_in); + writeln("(io debug) src out found: ", fn_src_in); } if (doc_matters.opt.action.source) { fn_src_in.copy(fn_src_out_filesystem); @@ -108,7 +108,7 @@ template SiSUpod() { ~ "/" ~ "sisu_document_make"; if (exists(fn_src_in)) { debug(io) { - writeln("WARNING (io debug) src out found: ", fn_src_in); + writeln("(io debug) src out found: ", fn_src_in); } if (doc_matters.opt.action.source) { fn_src_in.copy(fn_src_out_filesystem); @@ -139,7 +139,7 @@ template SiSUpod() { string[] filelist_src_zpod_arr; if (exists(fn_src_in)) { debug(io) { - writeln("WARNING (io debug) src out found: ", fn_src_in); + writeln("(io debug) src in found: ", fn_src_in); } filelist_src_out_sisupod_arr ~= fn_src_out_sisupod_zip_base; filelist_src_zpod_arr ~= fn_src_out_inside_pod; @@ -162,7 +162,7 @@ template SiSUpod() { } else { if (doc_matters.opt.action.verbose || doc_matters.opt.action.debug_do) { - writeln("WARNING (io) src out NOT found (markup source): ", fn_src_in); + writeln("WARNING (io) src in NOT found (markup source): ", fn_src_in); } } } { /+ bundle insert files +/ @@ -193,7 +193,7 @@ template SiSUpod() { ).filesystem_open_zpod.to!string; if (exists(fn_src_in)) { debug(io) { - writeln("WARNING (io debug) src out found: ", fn_src_in); + writeln("(io debug) src out found: ", fn_src_in); } if (doc_matters.opt.action.source) { fn_src_in.copy(fn_src_out_filesystem); @@ -217,16 +217,24 @@ template SiSUpod() { } } { auto fn_src_in = doc_matters.src.filename; - if (exists(fn_src_in)) { - if (doc_matters.opt.action.sisupod) { + if (doc_matters.opt.action.sisupod) { + if (exists(doc_matters.src.file_with_absolute_path)) { createZipFile!()(fn_sisupod, zip.build()); + } else { + writeln("WARNING check missing source file(s): ", doc_matters.opt.action.sisupod); + } + if (!(exists(fn_sisupod))) { + writeln("WARNING failed to create sisupod zip archive: ", fn_sisupod); } } } if (exists(fn_sisupod)) { try { - auto data = (cast(byte[]) (fn_sisupod).read); - writefln("%-(%02x%) %s", data.sha256Of, fn_sisupod); + if (doc_matters.opt.action.verbose) { + auto data = (cast(byte[]) (fn_sisupod).read); + writeln(doc_matters.src.filename, " >> "); + writefln("%-(%02x%) %s", data.sha256Of, fn_sisupod); + } debug(sisupod) { try { auto zipped = new ZipArchive((fn_sisupod).read); |