aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-12-08 13:05:35 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-01-13 16:06:43 -0500
commita8ec94f528d633fef6ab1d40a3c7564f38d15238 (patch)
tree23b73dab3559d1ea447dde29d68123183cd89280 /src/doc_reform
parentxmls, home button fixes (diff)
src without pod.manifest, report on verbose
Diffstat (limited to 'src/doc_reform')
-rw-r--r--src/doc_reform/io_in/paths_source.d21
-rwxr-xr-xsrc/doc_reform/spine.d2
2 files changed, 13 insertions, 10 deletions
diff --git a/src/doc_reform/io_in/paths_source.d b/src/doc_reform/io_in/paths_source.d
index fbb6d76..a460f7b 100644
--- a/src/doc_reform/io_in/paths_source.d
+++ b/src/doc_reform/io_in/paths_source.d
@@ -16,8 +16,9 @@ import
template PodManifest() {
mixin spineRgxInit;
static auto rgx = Rgx();
- auto PodManifest(P)(
- P _pth=""
+ auto PodManifest(O)(
+ O _opt_actions,
+ string _pth=""
) {
struct ManifestFile_ {
string pod_manifest_filename() {
@@ -25,20 +26,22 @@ template PodManifest() {
}
string pod_manifest_path() {
string _manifest_path;
- if ((isValidPath(_pth) && exists(_pth)!=0 && _pth.isDir)
- && (exists(_pth.chainPath(pod_manifest_filename).array)!=0
+ if ((isValidPath(_pth) && exists(_pth) != 0 && _pth.isDir)
+ && (exists(_pth.chainPath(pod_manifest_filename).array) != 0
&& (_pth.chainPath(pod_manifest_filename).array).isFile)) {
_manifest_path = _pth;
} else if (_pth.match(rgx.src_pth_contents)
- && exists(_pth)!=0 && _pth.isFile) {
+ && exists(_pth) != 0 && _pth.isFile) {
_manifest_path = _pth.dirName;
} else if (_pth.match(rgx.src_pth_pod_sst_or_ssm)
- && exists(_pth)!=0 && (_pth.isFile)) {
+ && exists(_pth) != 0 && (_pth.isFile)) {
if (auto m = _pth.match(rgx.src_pth_pod_sst_or_ssm)) {
_manifest_path = m.captures["podpath"];
}
} else {
- writeln("WARNING, issue with manifest_path: ", _pth);
+ if (_opt_actions.verbose || _opt_actions.very_verbose || _opt_actions.debug_do) {
+ writeln("WARNING, src is not a pod, issue with manifest_path: ", _pth); // remove? unless can distinguish pod
+ }
_manifest_path = null; // _manifest_path = "";
}
return _manifest_path;
@@ -75,7 +78,7 @@ template PathMatters() {
string _fns = "",
char[][] _manifest_fn_list = [[]],
) {
- auto _manifested = PodManifest!()(_pth);
+ auto _manifested = PodManifest!()(_opt_actions, _pth);
struct ManifestMatters_ {
auto env() {
auto _env = _env;
@@ -792,7 +795,7 @@ template spinePathsPods() {
}
auto fn_pod_filelist(string fn_src) {
auto pod_root_ = pod_root(fn_src);
- auto _manifested = PodManifest!()(fn_src).pod_manifest_filename;
+ auto _manifested = PodManifest!()(doc_matters.opt.action, fn_src).pod_manifest_filename;
auto pth_1_ = _manifested;
auto pth_2_ = ((pod_root(fn_src).filesystem_open_zpod.chainPath(_manifested)).asNormalizedPath).array;
struct _pods {
diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d
index b30773a..96ac7d4 100755
--- a/src/doc_reform/spine.d
+++ b/src/doc_reform/spine.d
@@ -564,7 +564,7 @@ void main(string[] args) {
}
}
foreach(arg; args[1..$]) { // refigure how args relate to _opt_action, need path from _opt_action or args early _manifested too late, work on (search for PathMatters and .harvest,
- auto _manifest_start = PodManifest!()(arg);
+ auto _manifest_start = PodManifest!()(_opt_action, arg);
if (arg.match(rgx.flag_action)) { /+ cli instruction, flag do +/
flag_action ~= " " ~ arg; // flags not taken by getopt
} else { /+ cli, assumed to be path to source files +/