aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output_sisupod.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-02-09 22:03:10 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit1c73ddf3894085c646b55d63e61a2483e03a3b4d (patch)
tree34e3a837d0e0d224008ff380055ea263a03d3c14 /org/output_sisupod.org
parentpaths, further adjustments (diff)
0.24.0 toml or sdlang for configuration
Diffstat (limited to 'org/output_sisupod.org')
-rw-r--r--org/output_sisupod.org58
1 files changed, 30 insertions, 28 deletions
diff --git a/org/output_sisupod.org b/org/output_sisupod.org
index 82e654b..7af3573 100644
--- a/org/output_sisupod.org
+++ b/org/output_sisupod.org
@@ -152,34 +152,36 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod;
}
}
} { /+ bundle 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
- = pths_sisupod.conf_root(doc_matters.src.filename).filesystem_open_zpod.to!string
- ~ "/" ~ "sisu_document_make"; // TODO
- if (exists(fn_src_in)) {
- debug(io) {
- writeln("WARNING (io debug) src out found: ", fn_src_in);
- }
- if (doc_matters.opt.action.source) {
- fn_src_in.copy(fn_src_out_filesystem);
- }
- if (doc_matters.opt.action.sisupod) {
- auto zip_arc_member_file = new ArchiveMember();
- zip_arc_member_file.name = fn_src_out_sisupod_zip_base;
- auto zip_data = new OutBuffer();
- zip_data.write((fn_src_in).readText);
- zip_arc_member_file.expandedData = zip_data.toBytes();
- zip.addMember(zip_arc_member_file);
- }
- } else {
- if (doc_matters.opt.action.verbose
- || doc_matters.opt.action.debug_do) {
- writeln("WARNING (io) src out NOT found (document make): ", fn_src_in);
+ foreach (extension; [".sdl", ".toml"]) {
+ 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" ~ extension;
+ 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
+ = pths_sisupod.conf_root(doc_matters.src.filename).filesystem_open_zpod.to!string
+ ~ "/" ~ "sisu_document_make" ~ extension; // TODO
+ if (exists(fn_src_in)) {
+ debug(io) {
+ writeln("WARNING (io debug) src out found: ", fn_src_in);
+ }
+ if (doc_matters.opt.action.source) {
+ fn_src_in.copy(fn_src_out_filesystem);
+ }
+ if (doc_matters.opt.action.sisupod) {
+ auto zip_arc_member_file = new ArchiveMember();
+ zip_arc_member_file.name = fn_src_out_sisupod_zip_base;
+ auto zip_data = new OutBuffer();
+ zip_data.write((fn_src_in).readText);
+ zip_arc_member_file.expandedData = zip_data.toBytes();
+ zip.addMember(zip_arc_member_file);
+ }
+ } else {
+ 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 +/