aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/meta/metadoc.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-01-25 17:13:52 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit524baa6ddd5f9cb49b1c5b015fbd6ef75ff72968 (patch)
treec66713d8559aa04f15f95825a6f5faec16827ce6 /src/sdp/meta/metadoc.d
parent0.23.3 work on source & target file paths/locations (diff)
paths, further adjustmentsdoc-reform_v0.0.23
Diffstat (limited to 'src/sdp/meta/metadoc.d')
-rw-r--r--src/sdp/meta/metadoc.d111
1 files changed, 21 insertions, 90 deletions
diff --git a/src/sdp/meta/metadoc.d b/src/sdp/meta/metadoc.d
index 129e53c..cbc5d51 100644
--- a/src/sdp/meta/metadoc.d
+++ b/src/sdp/meta/metadoc.d
@@ -42,8 +42,7 @@ template SiSUabstraction() {
/+ ↓ read file (filename with path) +/
/+ ↓ file tuple of header and content +/
debug(steps) {
- writeln(__LINE__, ":", __FILE__,
- ": step1 commence → (get document header & body & insert file list & if needed image list)"
+ writeln("step1 commence → (get document header & body & insert file list & if needed image list)"
);
}
auto _header_body_insertfilelist_imagelist
@@ -51,7 +50,7 @@ template SiSUabstraction() {
static assert(!isTypeTuple!(_header_body_insertfilelist_imagelist));
static assert(_header_body_insertfilelist_imagelist.length==4);
debug(steps) {
- writeln(__LINE__, ":", __FILE__, ": step1 complete");
+ writeln("- step1 complete");
}
debug(header_and_body) {
writeln(header);
@@ -60,21 +59,19 @@ template SiSUabstraction() {
}
/+ ↓ split header into make and meta +/
debug(steps) {
- writeln(__LINE__, ":", __FILE__,
- ": step2 commence → (doc header: make & meta as struct)"
- );
+ writeln("step2 commence → (read document header - toml or sdlang, return struct)");
}
auto _make_and_meta_struct
= docHeaderMakeAndMetaTupExtractAndConvertToStruct!()(
conf_files_composite_make,
_header_body_insertfilelist_imagelist[headBody.header]
- ); // breakage ...
+ );
debug(steps) {
- writeln(__LINE__, ":", __FILE__, ": step2 complete");
+ writeln("- step2 complete");
}
/+ ↓ document abstraction: process document, return abstraction as tuple +/
debug(steps) {
- writeln(__LINE__, ":", __FILE__, ": step3 commence → (document abstraction (da); da keys; segnames; doc_matters)");
+ writeln("step3 commence → (document abstraction (da); da keys; segnames; doc_matters)");
}
auto da = SiSUdocAbstraction!()(
_header_body_insertfilelist_imagelist[headBody.body_content],
@@ -89,15 +86,14 @@ template SiSUabstraction() {
string[] _doc_epub_segnames_0_4 = da[docAbst.segnames_0_4];
auto _images = da[docAbst.images];
debug(steps) {
- writeln(__LINE__, ":", __FILE__, ": step3 complete");
+ writeln("- step3 complete");
}
debug(steps) {
- writeln(__LINE__, ":", __FILE__, ": step4 commence → (doc_matters)");
+ writeln("step4 commence → (doc_matters)");
}
struct DocumentMatters {
auto conf_make_meta() { // TODO meld with all make instructions
- auto _k = _make_and_meta_struct;
- return _k;
+ return _make_and_meta_struct;
}
auto env() {
struct Env_ {
@@ -123,51 +119,15 @@ template SiSUabstraction() {
return Opt_();
}
auto src() {
+ return _manifest.src;
+ }
+ auto src_path_info() {
+ return SiSUpathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path
+ }
+ auto srcs() {
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;
+ return _header_body_insertfilelist_imagelist[headBody.insert_file_list];
}
auto image_list() {
return _images;
@@ -176,48 +136,19 @@ template SiSUabstraction() {
return SRC_();
}
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_();
+ return _manifest.pod;
}
auto xml() {
struct XML_ {
auto keys_seq() {
/+ contains .seg & .scroll sequences +/
- auto _k = _document_section_keys_sequenced;
- return _k;
+ return _document_section_keys_sequenced;
}
string[] segnames() {
- string[] _k = _doc_html_segnames;
- return _k;
+ return _doc_html_segnames;
}
string[] segnames_lv_0_to_4() {
- string[] _k = _doc_epub_segnames_0_4;
- return _k;
+ return _doc_epub_segnames_0_4;
}
}
return XML_();
@@ -228,7 +159,7 @@ template SiSUabstraction() {
}
auto doc_matters = DocumentMatters();
debug(steps) {
- writeln(__LINE__, ":", __FILE__, ": step4 complete");
+ writeln("- step4 complete");
}
auto t = tuple(doc_abstraction, doc_matters);
static assert(t.length==2);