diff options
author | Ralph Amissah <ralph@amissah.com> | 2017-11-08 20:02:48 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | 1d68345250b0fd26d3ea657ed28899dccaa324df (patch) | |
tree | a94ad71bfc5d081c15fd253f6bcc7a694141cd7f /org/sdp.org | |
parent | 0.20.0 sisupod & source dir structure changed (diff) |
process filesystem/unzipped sisupod.zip
- src pod dir structure changes
- notes
- the plan is to have a src manifest of related .sst or .ssm files
that can be pointed to for processing
- multilingual documents [ponder persistence for multilingual
documents]
- in the case of multilingual documents, there will be multiple
source documents on list with different language codes, and to
build this list, persistence is required
- inserted documents (from master .ssm or .sst) must track document
root
so inserts can be located, else not found
- consider a commandline -o --output path specifier
- steps
- auto create filelist
- for single source file
- for multilinugual source files
- process document by pointing at filelist (rather than file)
- if necessary manually create filelist (for multilinugual source)
- keep document root for document inserts (.ssi)
process filesystem/unzipped sisupod.zip
- source/sisupod path/dir structure representation changes
Diffstat (limited to 'org/sdp.org')
-rw-r--r-- | org/sdp.org | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/org/sdp.org b/org/sdp.org index 39d76f6..9cd57bc 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -316,6 +316,33 @@ foreach(arg; args[1..$]) { flag_action ~= " " ~ arg; // flags not taken by getopt } else if (arg.match(rgx.src_pth)) { fns_src ~= arg; // gather input markup source file names for processing + } else if (arg.match(rgx.src_pth_contents)) { + import std.file, + std.path; + string contents_location_; + try { + if (exists(arg)) { + contents_location_ = arg.readText; + } + } + catch (ErrnoException ex) { + } + catch (FileException ex) { + // Handle errors + } + auto contents_locations_arr = + (cast(char[]) contents_location_).split; + auto tmp_dir_ = (arg).dirName.array; + foreach (contents_location; contents_locations_arr) { + assert(contents_location.match(rgx.src_pth), + "not a recognised file: " ~ + contents_location + ); + auto contents_location_pth_ = (contents_location).to!string; + fns_src ~= (((tmp_dir_).chainPath(contents_location_pth_)).array).to!(char[]); + } + } else if (arg.match(rgx.src_pth_zip)) { + // fns_src ~= arg; // gather input markup source file names for processing } else { // anything remaining, unused arg_unrecognized ~= " " ~ arg; } @@ -373,8 +400,9 @@ scope(failure) { } } enforce( - fn_src.match(rgx.src_pth), - "not a sisu markup filename" + fn_src.match(rgx.src_pth_types), + "not a sisu markup filename: <<" ~ + fn_src ~ ">>" ); #+END_SRC @@ -403,6 +431,7 @@ if (doc_matters.opt_action["verbose"]) { SiSUabstractionSummary!()(doc_abstraction, doc_matters); } #+END_SRC + **** 1. _debug_ (document parts, checkdoc) :debug:checkdoc: - [[./meta_output_debugs.org][meta_output_debugs]] |