aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output/source_sisupod.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-01-25 17:13:52 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit524baa6ddd5f9cb49b1c5b015fbd6ef75ff72968 (patch)
treec66713d8559aa04f15f95825a6f5faec16827ce6 /src/sdp/output/source_sisupod.d
parent0.23.3 work on source & target file paths/locations (diff)
paths, further adjustmentsdoc-reform_v0.0.23
Diffstat (limited to 'src/sdp/output/source_sisupod.d')
-rw-r--r--src/sdp/output/source_sisupod.d46
1 files changed, 27 insertions, 19 deletions
diff --git a/src/sdp/output/source_sisupod.d b/src/sdp/output/source_sisupod.d
index c48a0e3..4e3bfc1 100644
--- a/src/sdp/output/source_sisupod.d
+++ b/src/sdp/output/source_sisupod.d
@@ -16,8 +16,8 @@ template SiSUpod() {
}
mixin SiSUoutputRgxInit;
string pwd = doc_matters.env.pwd;
- auto src_path_info = doc_matters.src.path_info;
- auto pth_sisudoc_src = doc_matters.src.path_info;
+ auto src_path_info = doc_matters.src_path_info;
+ auto pth_sisudoc_src = doc_matters.src_path_info;
auto pths_sisupod = SiSUpathsSisupods!()(doc_matters);
mixin SiSUlanguageCodes;
auto lang = Lang();
@@ -58,14 +58,17 @@ template SiSUpod() {
auto zip = new ZipArchive();
auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
{ /+ bundle images +/
- foreach (image; doc_matters.src.image_list) {
+ foreach (image; doc_matters.srcs.image_list) {
debug(sisupodimages) {
writeln(
pth_sisudoc_src.image_root.to!string, "/", image, " -> ",
pths_sisupod.image_root(doc_matters.src.filename).zpod, "/", image
);
}
- auto fn_src_in = pth_sisudoc_src.image_root.to!string ~ "/" ~ image;
+ auto fn_src_in = ((doc_matters.src.is_pod)
+ ? doc_matters.src.image_dir_path
+ : pth_sisudoc_src.image_root).to!string
+ ~ "/" ~ image;
auto fn_src_out_sisupod_zip_base
= pths_sisupod.image_root(doc_matters.src.filename).zpod.to!string
~ "/" ~ image;
@@ -74,7 +77,7 @@ template SiSUpod() {
~ "/" ~ image;
if (exists(fn_src_in)) {
debug(io) {
- writeln("src out found: ", fn_src_in);
+ writeln("WARNING (io debug) src out found: ", fn_src_in);
}
if (doc_matters.opt.action.source) {
fn_src_in.copy(fn_src_out_filesystem);
@@ -89,13 +92,15 @@ template SiSUpod() {
}
} else {
if (doc_matters.opt.action.verbose) {
- writeln("src out NOT found (image): ", fn_src_in);
+ writeln("WARNING (io) src out NOT found (image): ", fn_src_in);
}
}
}
} { /+ bundle sisu_document_make +/
- auto fn_src_in
- = pth_sisudoc_src.conf_root.to!string ~ "/" ~ "sisu_document_make"; // check (_sisu/sisu_document_make)
+ auto fn_src_in = ((doc_matters.src.is_pod)
+ ? doc_matters.src.conf_dir_path
+ : pth_sisudoc_src.conf_root).to!string
+ ~ "/" ~ "sisu_document_make";
auto fn_src_out_sisupod_zip_base
= pths_sisupod.conf_root(doc_matters.src.filename).zpod.to!string ~ "/" ~ "sisu_document_make";
auto fn_src_out_filesystem
@@ -103,7 +108,7 @@ template SiSUpod() {
~ "/" ~ "sisu_document_make"; // TODO
if (exists(fn_src_in)) {
debug(io) {
- writeln("src out found: ", fn_src_in);
+ writeln("WARNING (io debug) src out found: ", fn_src_in);
}
if (doc_matters.opt.action.source) {
fn_src_in.copy(fn_src_out_filesystem);
@@ -117,8 +122,9 @@ template SiSUpod() {
zip.addMember(zip_arc_member_file);
}
} else {
- if (doc_matters.opt.action.verbose) {
- writeln("src out NOT found (document make): ", fn_src_in);
+ if (doc_matters.opt.action.verbose
+ || doc_matters.opt.action.debug_do) {
+ writeln("WARNING (io) src out NOT found (document make): ", fn_src_in);
}
}
} { /+ TODO bundle primary file +/
@@ -133,7 +139,7 @@ template SiSUpod() {
string[] filelist_src_zpod_arr;
if (exists(fn_src_in)) {
debug(io) {
- writeln("src out found: ", fn_src_in);
+ writeln("WARNING (io debug) src out found: ", fn_src_in);
}
filelist_src_out_sisupod_arr ~= fn_src_out_sisupod_zip_base;
filelist_src_zpod_arr ~= fn_src_out_inside_pod;
@@ -154,13 +160,14 @@ template SiSUpod() {
zip.addMember(zip_arc_member_file);
}
} else {
- if (doc_matters.opt.action.verbose) {
- writeln("src out NOT found (markup source): ", fn_src_in);
+ if (doc_matters.opt.action.verbose
+ || doc_matters.opt.action.debug_do) {
+ writeln("WARNING (io) src out NOT found (markup source): ", fn_src_in);
}
}
} { /+ bundle insert files +/
- if (doc_matters.src.file_insert_list.length > 0) {
- foreach (insert_file; doc_matters.src.file_insert_list) {
+ if (doc_matters.srcs.file_insert_list.length > 0) {
+ foreach (insert_file; doc_matters.srcs.file_insert_list) {
debug(sisupod) {
writeln(
insert_file, " -> ",
@@ -186,7 +193,7 @@ template SiSUpod() {
).filesystem_open_zpod.to!string;
if (exists(fn_src_in)) {
debug(io) {
- writeln("src out found: ", fn_src_in);
+ writeln("WARNING (io debug) src out found: ", fn_src_in);
}
if (doc_matters.opt.action.source) {
fn_src_in.copy(fn_src_out_filesystem);
@@ -201,8 +208,9 @@ template SiSUpod() {
createZipFile!()(fn_sisupod, zip.build());
}
} else {
- if (doc_matters.opt.action.verbose) {
- writeln("src out NOT found (insert file): ", fn_src_in);
+ if (doc_matters.opt.action.verbose
+ || doc_matters.opt.action.debug_do) {
+ writeln("WARNING (io) src out NOT found (insert file): ", fn_src_in);
}
}
}