diff options
author | Ralph Amissah <ralph@amissah.com> | 2017-01-12 20:51:12 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | 45e1b786144b8ef0a70a235f8a1a89e90a752d8f (patch) | |
tree | e4e9d787fe9f0bce330a8db407e949aa9bf5ee8e /src/sdp/source_sisupod.d | |
parent | dom structure, levels marked up & collapsed (use e.g. in epub toc) (diff) |
0.11.0 improved message passing, using templates
Diffstat (limited to 'src/sdp/source_sisupod.d')
-rw-r--r-- | src/sdp/source_sisupod.d | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/sdp/source_sisupod.d b/src/sdp/source_sisupod.d new file mode 100644 index 0000000..dc54b21 --- /dev/null +++ b/src/sdp/source_sisupod.d @@ -0,0 +1,43 @@ +template SiSUpod() { + struct SDPsisupod { + + void sisupod_assemble( + string fn_src, + ) { + mixin SiSUpaths; + auto pth_sisupod = SiSUpodPaths(); + mixin SiSUlanguageCodes; + auto lang = Lang(); + /+ + dir structure + /tmp/_sisu_processing_/ralph/en/sisupod + ├── doc + │ └── en + └── image + + - create directory structure + + +/ + assert (match(fn_src, rgx.src_fn)); + try { + /+ create directory structure +/ + mkdirRecurse(pth_sisupod.doc(fn_src)); + mkdirRecurse(pth_sisupod.conf(fn_src)); + mkdirRecurse(pth_sisupod.css(fn_src)); + mkdirRecurse(pth_sisupod.image(fn_src)); + /+ copy relevant files +/ + auto f_out = pth_sisupod.fn_doc(fn_src, "en"); // you need fn without path and then to insert back language code for output sub-directory + debug(sisupod) { + writeln(__LINE__, ": ", fn_src, " -> ", f_out); + } + mkdirRecurse(pth_sisupod.doc_lng(fn_src, "en")); // need to extract language code directories (from directory structure or filenames & have a default) + copy(fn_src, f_out); + } + catch (ErrnoException ex) { + // Handle error + } + } + + + } +} |