aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/sdp.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-12-01 11:36:01 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit17b1e024c33bac309c36f439fe267a384548a8b8 (patch)
treeea88a9a3dc87f5c64f9d8b615adb169b5e5697d7 /org/sdp.org
parent0.21.0 paths, pod manifest source alternative (diff)
0.22.0 document matters & pod matters structsdoc-reform_v0.0.22
- better integrated, redundancy removed
Diffstat (limited to 'org/sdp.org')
-rw-r--r--org/sdp.org111
1 files changed, 63 insertions, 48 deletions
diff --git a/org/sdp.org b/org/sdp.org
index 32e9833..650fb21 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -26,7 +26,7 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 21, 0);
+enum ver = Version(0, 22, 0);
#+END_SRC
** compilation restrictions (supported compilers)
@@ -486,14 +486,14 @@ auto _env = [
"home" : environment["HOME"],
];
auto _manifest = PodManifest!()();
-auto _manifest_plus = PodManifestAndSrcFile!()(_opt_action, _env);
+auto _manifest_plus = PodMatters!()(_opt_action, _env);
auto _manifests = [ _manifest_plus ];
foreach(arg; args[1..$]) {
_manifest = PodManifest!()(arg);
if (arg.match(rgx.flag_action)) {
flag_action ~= " " ~ arg; // flags not taken by getopt
} else if (arg.match(rgx.src_pth)) {
- _manifests ~= PodManifestAndSrcFile!()(_opt_action, _env, arg, arg); // gather input markup source file names for processing
+ _manifests ~= PodMatters!()(_opt_action, _env, arg, arg); // gather input markup source file names for processing
} else if (_manifest.pod_manifest_file_with_path) {
string contents_location_raw_;
string contents_location_;
@@ -536,7 +536,7 @@ foreach(arg; args[1..$]) {
|| (contents_location_pth_).match(lang_rgx_)
) {
auto _fns = (((tmp_dir_).chainPath(contents_location_pth_)).array).to!(string);
- _manifest_plus = PodManifestAndSrcFile!()(_opt_action, _env, arg, _fns, contents_locations_arr);
+ _manifest_plus = PodMatters!()(_opt_action, _env, arg, _fns, contents_locations_arr);
_manifests ~= _manifest_plus; // TODO how to capture?
}
}
@@ -805,68 +805,83 @@ debug(steps) {
writeln(__LINE__, ":", __FILE__, ": step4 commence → (doc_matters)");
}
struct DocumentMatters {
- auto keys_seq() {
- /+ contains .seg & .scroll sequences +/
- auto _k = _document_section_keys_sequenced;
- return _k;
- }
- string[] segnames() {
- string[] _k = _doc_html_segnames;
- return _k;
- }
- string[] segnames_lv_0_to_4() {
- string[] _k = _doc_epub_segnames_0_4;
- return _k;
- }
- auto conf_make_meta() {
- auto _k = _make_and_meta_struct;
- return _k;
- }
- auto source_filename() {
- string _k = _manifest.src_fn;
- return _k;
- }
- auto src_path_info() {
- string _pwd = _env["pwd"];
- auto _k = SiSUpathsSRC!()(_pwd, _manifest.src_fn);
- return _k;
- }
auto opt_action() {
/+ getopt options, commandline instructions, raw
- processing instructions --epub --html etc.
- command line config instructions --output-path
+/
- auto _k = _opt_action;
+ return _opt_action;
+ }
+ auto conf_make_meta() { // TODO meld with all make instructions
+ auto _k = _make_and_meta_struct;
return _k;
}
auto environment() {
- auto _k = _env;
+ struct Env_ {
+ auto pwd() {
+ return _manifest.pwd;
+ }
+ auto home() {
+ return _manifest.home;
+ }
+ }
+ return Env_();
+ }
+ auto is_pod() {
+ return _manifest.is_pod;
+ }
+ auto source_filename() {
+ return _manifest.src_fn;
+ }
+ auto src_path_info() { // consider, reconsider?
+ auto _k = SiSUpathsSRC!()(_manifest.pwd, _manifest.src_fn);
return _k;
}
auto language() {
- string _k;
- if (auto m = (_manifest.src_fn).match(rgx.language_code_and_filename)) {
- _k = m.captures[1];
- } else {
- _k = "en";
- }
- return _k;
+ return _manifest.src_lng;
+ }
+ auto output_path() {
+ return _manifest.output_path;
+ }
+ auto pod_manifest_list_of_filenames() {
+ return _manifest.pod_manifest_list_of_filenames;
+ }
+ auto pod_manifest_list_of_languages() {
+ return _manifest.pod_manifest_list_of_languages;
+ }
+ auto pod_manifest_filename() {
+ return _manifest.pod_manifest_filename;
+ }
+ auto pod_manifest_path() {
+ return _manifest.pod_manifest_path;
+ }
+ auto pod_manifest_file_with_path() {
+ return _manifest.pod_manifest_file_with_path;
+ }
+ auto pod_config_dirs() {
+ return _manifest.pod_config_dirs;
+ }
+ auto pod_image_dirs() {
+ return _manifest.pod_image_dirs;
}
auto file_insert_list() {
string[] _k = _header_body_inserts[headBody.insert_filelist];
return _k;
}
- auto pod_manifest() {
- /+ extensive information on
- - source processing paths
- - repetition of opt_action with additional processing, including
- - output path if any
- +/
- auto _k = _manifest;
+ auto image_list() {
+ return _images;
+ }
+ auto keys_seq() {
+ /+ contains .seg & .scroll sequences +/
+ auto _k = _document_section_keys_sequenced;
return _k;
}
- auto image_list() {
- auto _k = _images;
+ string[] segnames() {
+ string[] _k = _doc_html_segnames;
+ return _k;
+ }
+ string[] segnames_lv_0_to_4() {
+ string[] _k = _doc_epub_segnames_0_4;
return _k;
}
}