aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output_sisupod.org
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 /org/output_sisupod.org
parent0.23.3 work on source & target file paths/locations (diff)
paths, further adjustmentsdoc-reform_v0.0.23
Diffstat (limited to 'org/output_sisupod.org')
-rw-r--r--org/output_sisupod.org48
1 files changed, 29 insertions, 19 deletions
diff --git a/org/output_sisupod.org b/org/output_sisupod.org
index 1031456..82e654b 100644
--- a/org/output_sisupod.org
+++ b/org/output_sisupod.org
@@ -62,8 +62,8 @@ debug(asserts) {
}
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();
@@ -113,14 +113,17 @@ debug(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;
@@ -129,7 +132,7 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
~ "/" ~ 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);
@@ -144,13 +147,15 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
}
} 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
@@ -158,7 +163,7 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
~ "/" ~ "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);
@@ -172,8 +177,9 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
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 +/
@@ -188,7 +194,7 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
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;
@@ -209,13 +215,14 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
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, " -> ",
@@ -241,7 +248,7 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
).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);
@@ -256,8 +263,9 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
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);
}
}
}
@@ -318,3 +326,5 @@ if (exists(fn_sisupod)) {
}
}
#+END_SRC
+
+* __END__