aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/sdp.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-11-27 20:35:14 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit6dc69228f20b3566320b52966b3782d633171e71 (patch)
tree893201ffbd3bbd6c1ccb595be2af8354593cb49a /org/sdp.org
parent0.20.1 struct for opt_actions (diff)
0.20.2 paths, config & manifest files
Diffstat (limited to 'org/sdp.org')
-rw-r--r--org/sdp.org20
1 files changed, 9 insertions, 11 deletions
diff --git a/org/sdp.org b/org/sdp.org
index a6e552f..e6b26fc 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -26,7 +26,7 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 20, 1);
+enum ver = Version(0, 20, 2);
#+END_SRC
#+NAME: version_txt
@@ -485,21 +485,19 @@ auto _opt_action = OptActions();
#+NAME: sdp_args
#+BEGIN_SRC d
foreach(arg; args[1..$]) {
+ auto _manifest = ManifestFile!()(arg);
if (arg.match(rgx.flag_action)) {
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)
- || ((arg.isDir) && ((arg.chainPath("sisudoc.txt").array).isFile))
- ) {
+ } else if (_manifest.manifest_file_and_path) {
string contents_location_;
- string sisudoc_txt_;
- if ((arg.chainPath("sisudoc.txt").array).isFile) {
- sisudoc_txt_ = arg.chainPath("sisudoc.txt").array;
- } else if (arg.match(rgx.src_pth_contents)) {
- sisudoc_txt_ = arg;
- } else {
- }
+ string sisudoc_txt_ = _manifest.manifest_file_and_path;
+ enforce(
+ exists(sisudoc_txt_)!=0,
+ "file not found: «" ~
+ sisudoc_txt_ ~ "»"
+ );
try {
if (exists(sisudoc_txt_)) {
contents_location_ = sisudoc_txt_.readText;