aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/meta/metadoc.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-01-06 20:34:42 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commitbdcb9189e4cf221bec1efaf2e6e612b127e51f25 (patch)
tree139cffff54a3afdfa9dd70799ef489c3fb51c73d /src/sdp/meta/metadoc.d
parenttarget config file locations, refine (diff)
0.23.3 work on source & target file paths/locations
Diffstat (limited to 'src/sdp/meta/metadoc.d')
-rw-r--r--src/sdp/meta/metadoc.d186
1 files changed, 120 insertions, 66 deletions
diff --git a/src/sdp/meta/metadoc.d b/src/sdp/meta/metadoc.d
index 44807b2..129e53c 100644
--- a/src/sdp/meta/metadoc.d
+++ b/src/sdp/meta/metadoc.d
@@ -46,8 +46,8 @@ template SiSUabstraction() {
": step1 commence → (get document header & body & insert file list & if needed image list)"
);
}
- auto _header_body_insertfilelist_imagelist =
- SiSUrawMarkupContent!()(_opt_action, _manifest.src_path_and_fn);
+ auto _header_body_insertfilelist_imagelist
+ = SiSUrawMarkupContent!()(_opt_action, _manifest.src.path_and_fn);
static assert(!isTypeTuple!(_header_body_insertfilelist_imagelist));
static assert(_header_body_insertfilelist_imagelist.length==4);
debug(steps) {
@@ -64,8 +64,11 @@ template SiSUabstraction() {
": step2 commence → (doc header: make & meta as struct)"
);
}
- auto _make_and_meta_struct =
- docHeaderMakeAndMetaTupExtractAndConvertToStruct!()(conf_files_composite_make, _header_body_insertfilelist_imagelist[headBody.header]); // breakage ...
+ auto _make_and_meta_struct
+ = docHeaderMakeAndMetaTupExtractAndConvertToStruct!()(
+ conf_files_composite_make,
+ _header_body_insertfilelist_imagelist[headBody.header]
+ ); // breakage ...
debug(steps) {
writeln(__LINE__, ":", __FILE__, ": step2 complete");
}
@@ -92,84 +95,135 @@ template SiSUabstraction() {
writeln(__LINE__, ":", __FILE__, ": step4 commence → (doc_matters)");
}
struct DocumentMatters {
- auto opt_action() {
- /+ getopt options, commandline instructions, raw
- - processing instructions --epub --html etc.
- - command line config instructions --output-path
- +/
- return _opt_action;
- }
auto conf_make_meta() { // TODO meld with all make instructions
auto _k = _make_and_meta_struct;
return _k;
}
- auto environment() {
+ auto env() {
struct Env_ {
auto pwd() {
- return _manifest.pwd;
+ return _manifest.env.pwd;
}
auto home() {
- return _manifest.home;
+ return _manifest.env.home;
}
}
return Env_();
}
- auto is_pod() {
- return _manifest.is_pod;
- }
- auto source_filename() {
- return _manifest.src_fn;
+ auto opt() {
+ struct Opt_ {
+ auto action() {
+ /+ getopt options, commandline instructions, raw
+ - processing instructions --epub --html etc.
+ - command line config instructions --output-path
+ +/
+ return _opt_action;
+ }
+ }
+ return Opt_();
}
- auto src_path_info() { // consider, reconsider?
- auto _k = SiSUpathsSRC!()(_manifest.pwd, _manifest.src_fn);
- return _k;
+ auto src() {
+ struct SRC_ {
+ auto is_pod() {
+ return _manifest.src.is_pod;
+ }
+ auto filename() {
+ return _manifest.src.filename;
+ }
+ auto language() {
+ return _manifest.src.lng;
+ }
+ auto path_info() {
+ auto _k = SiSUpathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path
+ return _k;
+ }
+ auto file_with_absolute_path() {
+ auto _k = _manifest.src.file_with_absolute_path;
+ return _k;
+ }
+ auto absolute_path_to_src() {
+ auto _k = _manifest.src.absolute_path_to_src;
+ return _k;
+ }
+ auto base_dir() {
+ auto _k = _manifest.src.base_dir;
+ return _k;
+ }
+ auto base_parent_dir_path() {
+ auto _k = _manifest.src.base_parent_dir_path;
+ return _k;
+ }
+ auto base_dir_path() {
+ auto _k = _manifest.src.base_dir_path;
+ return _k;
+ }
+ auto media_dir_path() {
+ auto _k = _manifest.src.media_dir_path;
+ return _k;
+ }
+ auto base_parent_dir() {
+ auto _k = _manifest.src.base_parent_dir;
+ return _k;
+ }
+ auto file_insert_list() {
+ string[] _k = _header_body_insertfilelist_imagelist[headBody.insert_file_list];
+ return _k;
+ }
+ auto image_list() {
+ return _images;
+ }
+ }
+ return SRC_();
}
- auto language() {
- return _manifest.src_lng;
+ auto pod() {
+ struct Pod_ {
+ auto src_is_pod() {
+ return _manifest.pod.src_is_pod;
+ }
+ auto manifest_list_of_filenames() {
+ return _manifest.pod.manifest_list_of_filenames;
+ }
+ auto manifest_list_of_languages() {
+ return _manifest.pod.manifest_list_of_languages;
+ }
+ auto manifest_filename() {
+ return _manifest.pod.manifest_filename;
+ }
+ auto manifest_path() {
+ return _manifest.pod.manifest_path;
+ }
+ auto manifest_file_with_path() {
+ return _manifest.pod.manifest_file_with_path;
+ }
+ auto config_dirs() {
+ return _manifest.pod.config_dirs;
+ }
+ auto image_dirs() {
+ return _manifest.pod.image_dirs;
+ }
+ }
+ return Pod_();
+ }
+ auto xml() {
+ struct XML_ {
+ 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;
+ }
+ }
+ return XML_();
}
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_insertfilelist_imagelist[headBody.insert_file_list];
- return _k;
- }
- auto image_list() {
- return _images;
- }
- 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;
+ return _manifest.output.path;
}
}
auto doc_matters = DocumentMatters();