aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/sdp.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/sdp.d')
-rwxr-xr-xsrc/sdp/sdp.d32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/sdp/sdp.d b/src/sdp/sdp.d
index 0075de8..c861d1d 100755
--- a/src/sdp/sdp.d
+++ b/src/sdp/sdp.d
@@ -145,6 +145,33 @@ void main(string[] args) {
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;
}
@@ -178,8 +205,9 @@ void main(string[] args) {
}
}
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 ~ ">>"
);
auto t = SiSUabstraction!()(fn_src, opts, env);
static assert(!isTypeTuple!(t));