aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sdp/output/paths_source.d29
-rwxr-xr-xsrc/sdp/sdp.d6
2 files changed, 20 insertions, 15 deletions
diff --git a/src/sdp/output/paths_source.d b/src/sdp/output/paths_source.d
index 1fd87e5..de14b23 100644
--- a/src/sdp/output/paths_source.d
+++ b/src/sdp/output/paths_source.d
@@ -11,29 +11,33 @@ import std.array,
std.stdio,
std.conv : to;
import sdp.meta.rgx;
-template ManifestFile() {
+template PodManifest() {
mixin SiSUrgxInit;
static auto rgx = Rgx();
- auto ManifestFile(P)(
+ auto PodManifest(P)(
P _pth,
) {
struct ManifestFile_ {
- auto manifest_file() {
+ auto pod_manifest_filename() {
string _manifest_file = "sisudoc.txt";
return _manifest_file;
}
- auto manifest_file_and_path() {
- string _manifest_file_and_path;
+ auto pod_manifest_path() {
+ string _manifest_path;
if (isValidPath(_pth) && _pth.isDir
- && ((_pth.chainPath(manifest_file).array).isFile)) {
- _manifest_file_and_path = _pth.chainPath(manifest_file).array;
+ && ((_pth.chainPath(pod_manifest_filename).array).isFile)) {
+ _manifest_path = _pth;
} else if (_pth.match(rgx.src_pth_contents)
&& (_pth.isFile)) {
- _manifest_file_and_path = _pth;
+ _manifest_path = dirName(_pth);
} else {
- // _manifest_file_and_path = "";
+ // _manifest_path = "";
}
- return _manifest_file_and_path;
+ return _manifest_path;
+ }
+ auto pod_manifest_file_with_path() {
+ string _manifest_path_and_file = pod_manifest_path.chainPath(pod_manifest_filename).array;
+ return _manifest_path_and_file;
}
}
return ManifestFile_();
@@ -360,8 +364,9 @@ template SiSUpathsSisupods() {
}
auto fn_pod_filelist(string fn_src) {
auto pod_root_ = pod_root(fn_src);
- auto pth_1_ = "sisudoc.txt";
- auto pth_2_ = pod_root(fn_src).filesystem_open_zpod.chainPath("sisudoc.txt").array;
+ auto _manifest = PodManifest!()(fn_src).pod_manifest_filename;
+ auto pth_1_ = _manifest;
+ auto pth_2_ = pod_root(fn_src).filesystem_open_zpod.chainPath(_manifest).array;
struct _pods {
auto zpod() {
return pth_1_;
diff --git a/src/sdp/sdp.d b/src/sdp/sdp.d
index a9f63e2..af3a0a0 100755
--- a/src/sdp/sdp.d
+++ b/src/sdp/sdp.d
@@ -300,14 +300,14 @@ void main(string[] args) {
}
auto _opt_action = OptActions();
foreach(arg; args[1..$]) {
- auto _manifest = ManifestFile!()(arg);
+ auto _manifest = PodManifest!()(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 (_manifest.manifest_file_and_path) {
+ } else if (_manifest.pod_manifest_file_with_path) {
string contents_location_;
- string sisudoc_txt_ = _manifest.manifest_file_and_path;
+ string sisudoc_txt_ = _manifest.pod_manifest_file_with_path;
enforce(
exists(sisudoc_txt_)!=0,
"file not found: «" ~