aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/default_misc.org284
-rw-r--r--org/meta_abstraction.org132
-rw-r--r--org/meta_conf_make_meta.org729
-rw-r--r--org/meta_debugs.org44
-rw-r--r--org/meta_read_source_files.org25
-rw-r--r--org/output_sqlite.org151
-rw-r--r--org/output_xmls.org58
-rw-r--r--org/sdp.org93
8 files changed, 569 insertions, 947 deletions
diff --git a/org/default_misc.org b/org/default_misc.org
index 50d3b9c..26afebc 100644
--- a/org/default_misc.org
+++ b/org/default_misc.org
@@ -60,153 +60,161 @@ import
std.conv : to;
#+END_SRC
-** settings metadata associative array indexes :settings:
-**** conf associative array
+** struct ConfComposite
#+name: meta_defaults_template_registers
#+BEGIN_SRC d
-static string[string][string] conf_aa_empty() {
- auto conf_ = [
- "webserv": [
- "url_root" : "",
- "path" : "~/sdp_www" ,
- "images" : "" ,
- "cgi" : "/usr/local/lib/sdp-cgi"
- ],
- "webserv_cgi": [
- "host" : "localhost",
- "base_path" : "",
- "port" : "8081",
- "user" : "",
- "file_links" : "www.sisudoc.org"
- ],
- "processing": [
- "path" : "~",
- "dir" : "_sisu_processing",
- "concord_max" : "400000"
- ],
- "flag": [
- "act0" : "--digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --manifest --verbose",
- "act1" : "--digest --text --html --manifest",
- "act2" : "--digest --text --html --epub --pdf --manifest",
- "act3" : "--digest --qrcode --text --html --epub --concordance --pdf --manifest",
- "act4" : "--digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --manifest",
- "act5" : "--digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --sqlite --manifest",
- "act6" : "--digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --manifest",
- "act7" : "--digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --source --sisupod --manifest",
- "act8" : "--digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --manifest",
- "act9" : "--digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --source --sisupod --manifest"
- ],
- "default": [
- "papersize" : "a4,letter",
- "text_wrap" : "78",
- "emphasis" : "bold",
- "language" : "en",
- "digest" : "sha256"
- ],
- "permission": [
- "share_source" : ""
- ],
- "program_select": [
- "editor" : "vim",
- "epub_viewer" : "ebook-viewer",
- "html_viewer" : "xombrero",
- "odf_viewer" : "lowriter",
- "pdf_viewer" : "evince",
- "xml_viewer" : "xml-viewer"
- ],
- "search": [
- "flag" : "",
- "action" : "",
- "db" : "",
- "title" : ""
- ],
- "make": [
- "bold" : "",
- "breaks" : "",
- "cover_image" : "",
- "css" : "",
- "emphasis" : "",
- "footer" : "",
- "headings" : "",
- "home_button_image" : "",
- "home_button_text" : "",
- "italics" : "",
- "num_top" : "",
- "num_depth" : "",
- "substitute" : "",
- "texpdf_font" : ""
- ],
- ];
- return conf_;
+struct ConfCompositeMake {
+ string bold = "";
+ string breaks = "";
+ string cover_image = "";
+ string css = "";
+ string emphasis = "";
+ string footer = "";
+ string headings = "";
+ string home_button_image = "";
+ string home_button_text = "";
+ string italics = "";
+ string num_top = "";
+ string num_depth = "";
+ string substitute = "";
+ string texpdf_font = "";
+}
+struct ConfCompositeMakeStr {
+ string bold = "";
+ string breaks = "";
+ string cover_image = "";
+ string css = "";
+ string emphasis = "";
+ string footer = "";
+ string headings = "";
+ string home_button_image = "";
+ string home_button_text = "";
+ string italics = "";
+ string num_top = "";
+ string num_depth = "";
+ string substitute = "";
+ string texpdf_font = "";
+}
+struct ConfCompositeSiteLocal {
+ string webserv_url_root = "";
+ string webserv_path = "";
+ string webserv_images = "";
+ string webserv_cgi = "";
+ string webserv_cgi_host = "";
+ string webserv_cgi_host_path = "";
+ string webserv_cgi_port = "";
+ string webserv_cgi_user = "";
+ string webserv_cgi_file_links = "";
+ string processing_path = "";
+ string processing_dir = "";
+ string processing_concord_max = "";
+ string flag_act0 = "";
+ string flag_act1 = "";
+ string flag_act2 = "";
+ string flag_act3 = "";
+ string flag_act4 = "";
+ string flag_act5 = "";
+ string flag_act6 = "";
+ string flag_act7 = "";
+ string flag_act8 = "";
+ string flag_act9 = "";
+ string default_papersize = "";
+ string default_text_wrap = "";
+ string default_emphasis = "";
+ string default_language = "";
+ string default_digest = "";
+ string permission_share_source = "";
+ string search_flag = "";
+ string search_action = "";
+ string search_db = "";
+ string search_title = "";
+}
+struct MetaComposite {
+ string classify_dewey = "";
+ string classify_keywords = "";
+ string classify_loc = "";
+ string classify_subject = "";
+ string classify_topic_register = "";
+ string creator_author = "";
+ string creator_author_email = "";
+ string creator_illustrator = "";
+ string creator_translator = "";
+ string date_added_to_site = "";
+ string date_available = "";
+ string date_created = "";
+ string date_issued = "";
+ string date_modified = "";
+ string date_published = "";
+ string date_valid = "";
+ string identifier_isbn = "";
+ string identifier_oclc = "";
+ string identifier_pg = "";
+ string links = "";
+ string notes_abstract = "";
+ string notes_description = "";
+ string original_language = "";
+ string original_source = "";
+ string original_title = "";
+ string publisher = "";
+ string rights_copyright = "";
+ string rights_cover = "";
+ string rights_illustrations = "";
+ string rights_license = "";
+ string title_edition = "";
+ string title_full = "";
+ string title_language = "";
+ string title_main = "";
+ string title_note = "";
+ string title_sub = "";
+ string title_subtitle = "";
+}
+struct ConfComposite {
+ MetaComposite meta;
+ ConfCompositeMake make;
+ ConfCompositeSiteLocal conf;
+}
+struct ConfCompositePlus {
+ MetaComposite meta;
+ ConfCompositeMake make;
+ ConfCompositeMakeStr make_str;
+ ConfCompositeSiteLocal conf;
}
#+END_SRC
-**** meta (metadata) associative array
+** extractSDLangTabOrAttrib
#+name: meta_defaults_template_registers
#+BEGIN_SRC d
-static string[string][string] meta_aa_empty() {
- auto meta_ = [
- "classify": [
- "dewey" : "",
- "keywords" : "",
- "loc" : "",
- "subject" : "",
- "topic_register" : ""
- ],
- "creator": [
- "author" : "",
- "author_email" : "",
- "illustrator" : "",
- "translator" : ""
- ],
- "date": [
- "added_to_site" : "",
- "available" : "",
- "created" : "",
- "issued" : "",
- "modified" : "",
- "published" : "",
- "valid" : ""
- ],
- "identifier": [
- "isbn" : "",
- "oclc" : "",
- "pg" : ""
- ],
- "links": [
- "link" : ""
- ],
- "notes": [
- "abstract" : "",
- "description" : ""
- ],
- "original": [
- "language" : "",
- "source" : "",
- "title" : ""
- ],
- "publisher": [
- "name" : ""
- ],
- "rights": [
- "copyright" : "",
- "cover" : "",
- "illustrations" : "",
- "license" : ""
- ],
- "title": [
- "edition" : "",
- "full" : "",
- "language" : "",
- "main" : "",
- "note" : "",
- "sub" : "",
- "subtitle" : ""
- ]
- ];
- return meta_;
+string extractSDLangTabOrAttrib(S)(S conf_sdlang, string maintab, string atab) {
+ string _conf_composite_string = "";
+ if (maintab in conf_sdlang.maybe.tags) {
+ auto _maintag = conf_sdlang.getTag(maintab);
+ if ((atab in _maintag.maybe.tags)
+ && (_maintag.getTagValues(atab).length > 0)) {
+ debug(configsdlang) {
+ writeln(__LINE__, ": make:", atab, ": ", _maintag.getTagValues(atab)[0]);
+ }
+ if (_maintag.getTagValues(atab).length == 1) {
+ writeln((_maintag.getTagValues(atab)[0]).to!string);
+ _conf_composite_string = (_maintag.getTagValues(atab)[0]).to!string;
+ } else if (_maintag.getTagValues(atab).length > 1) {
+ string _tmp = "";
+ foreach (st; _maintag.getTagValues(atab)) {
+ writeln(st.to!string, ";");
+ _tmp ~= st.to!string ~ ";";
+ }
+ _conf_composite_string = _tmp;
+ }
+ } else if ((atab in _maintag.maybe.attributes)
+ && (_maintag.maybe.attributes[atab][0].value.length > 0)) {
+ debug(configsdlang) {
+ writeln(__LINE__, ": make:", atab, ": ", conf_sdlang.tags[maintag][0].attributes[atab][0].value);
+ }
+ _conf_composite_string = (_maintag.attributes[atab][0].value).to!string;
+ }
+ }
+ return _conf_composite_string;
}
#+END_SRC
diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org
index f7291cf..358feb4 100644
--- a/org/meta_abstraction.org
+++ b/org/meta_abstraction.org
@@ -35,17 +35,14 @@ template SiSUdocAbstraction() {
/+ ↓ abstraction struct init +/
<<abs_top_init_struct>>
/+ ↓ abstract marked up document +/
- auto SiSUdocAbstraction(Src,Make,Meta,Opt)(
+ auto SiSUdocAbstraction(Src,CMM,Opt)(
Src markup_sourcefile_content,
- Make dochead_make_aa,
- Meta dochead_meta_aa,
+ CMM conf_make_meta,
Opt opt_action,
) {
static auto rgx = Rgx();
debug(asserts) {
static assert(is(typeof(markup_sourcefile_content) == char[][]));
- static assert(is(typeof(dochead_make_aa) == string[string][string]));
- static assert(is(typeof(dochead_meta_aa) == string[string][string]));
static assert(is(typeof(opt_action) == bool[string]));
}
/+ ↓ abstraction init +/
@@ -870,7 +867,7 @@ if there is a blurb section you need to:
#+BEGIN_SRC d
} else if (obj_type_status["poem"] == TriState.on) {
/+ within block object: poem +/
- _poem_block_(line, an_object, obj_type_status, cntr, obj_cite_number_poem, dochead_make_aa);
+ _poem_block_(line, an_object, obj_type_status, cntr, obj_cite_number_poem, conf_make_meta);
continue;
#+END_SRC
@@ -880,7 +877,7 @@ if there is a blurb section you need to:
#+BEGIN_SRC d
} else if (obj_type_status["table"] == TriState.on) {
/+ within block object: table +/
- _table_block_(line, an_object, obj_type_status, dochead_make_aa);
+ _table_block_(line, an_object, obj_type_status, conf_make_meta);
continue;
#+END_SRC
@@ -991,10 +988,10 @@ if (line.matchFirst(rgx.book_index)
&& ((obj_type_status["para"] == State.off)
&& (obj_type_status["heading"] == State.off))) {
/+ heading or para but neither flag nor line exists +/
- if ((dochead_make_aa["make"]["headings"].length > 2)
+ if ((conf_make_meta.make.headings.length > 2)
&& (obj_type_status["make_headings"] == State.off)) {
/+ heading found +/
- _heading_found_(line, dochead_make_aa["make"]["headings"], heading_match_str, heading_match_rgx, obj_type_status);
+ _heading_found_(line, conf_make_meta.make.headings, heading_match_str, heading_match_rgx, obj_type_status);
}
if ((obj_type_status["make_headings"] == State.on)
&& ((line_occur["para"] == State.off)
@@ -1012,7 +1009,7 @@ if (line.matchFirst(rgx.book_index)
+/
if (line.matchFirst(rgx.heading)) {
/+ heading match +/
- _heading_matched_(line, line_occur, an_object, an_object_key, lv, collapsed_lev, obj_type_status, dochead_meta_aa);
+ _heading_matched_(line, line_occur, an_object, an_object_key, lv, collapsed_lev, obj_type_status, conf_make_meta);
} else if (line_occur["para"] == State.off) {
/+ para match +/
an_object_key="body_nugget";
@@ -1063,7 +1060,7 @@ _block_flag_line_empty_(
cntr,
obj_type_status,
obj_cite_number_poem,
- dochead_make_aa
+ conf_make_meta,
);
#+END_SRC
@@ -1096,7 +1093,7 @@ if ((obj_type_status["heading"] == State.on)
an_object["is"] = "heading";
an_object_key="body_nugget";
auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[sObj.content];
anchor_tags = substantive_object_and_anchor_tags_tuple[sObj.anchor_tags];
if (an_object["lev_markup_number"].to!int == 4) {
@@ -1138,7 +1135,7 @@ if ((obj_type_status["heading"] == State.on)
_anchor_tag=to!string(obj_cite_digits.on);
the_table_of_contents_section = obj_im.table_of_contents_gather_headings(
an_object,
- dochead_make_aa,
+ conf_make_meta,
segment_anchor_tag_that_object_belongs_to,
_anchor_tag,
lev4_subtoc,
@@ -1205,7 +1202,7 @@ if ((obj_type_status["heading"] == State.on)
an_object["is"],
);
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_para = comp_obj_para.init;
@@ -3127,13 +3124,13 @@ why extra object stuff only in poem/verse?
#+name: abs_functions_block_poem
#+BEGIN_SRC d
-void _poem_block_(L,O,T,C,N,Ma)(
- L line,
- return ref O an_object,
- return ref T obj_type_status,
- return ref C cntr,
- N obj_cite_number_poem,
- Ma dochead_make_aa,
+void _poem_block_(L,O,T,C,N,CMM)(
+ L line,
+ return ref O an_object,
+ return ref T obj_type_status,
+ return ref C cntr,
+ N obj_cite_number_poem,
+ CMM conf_make_meta,
) {
debug(asserts) {
static assert(is(typeof(line) == char[]));
@@ -3141,7 +3138,6 @@ void _poem_block_(L,O,T,C,N,Ma)(
static assert(is(typeof(obj_type_status) == int[string]));
static assert(is(typeof(cntr) == int));
static assert(is(typeof(obj_cite_number_poem) == string[string]));
- static assert(is(typeof(dochead_make_aa) == string[string][string]));
}
static auto rgx = Rgx();
if (obj_type_status["curly_poem"] == TriState.on) {
@@ -3175,7 +3171,7 @@ void _poem_block_(L,O,T,C,N,Ma)(
}
an_object["is"] = "verse";
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
@@ -3233,7 +3229,7 @@ void _poem_block_(L,O,T,C,N,Ma)(
an_object["is"]
);
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
@@ -3276,7 +3272,7 @@ void _poem_block_(L,O,T,C,N,Ma)(
processing.remove("verse");
an_object["is"] = "verse";
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
@@ -3334,7 +3330,7 @@ void _poem_block_(L,O,T,C,N,Ma)(
an_object["is"]
);
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
@@ -3381,11 +3377,11 @@ you need:
#+name: abs_functions_block_table
#+BEGIN_SRC d
-void _table_block_(L,O,T,Ma)(
+void _table_block_(L,O,T,CMM)(
L line,
return ref O an_object,
- return ref T obj_type_status,
- return ref Ma dochead_make_aa
+ return ref T obj_type_status,
+ return ref CMM conf_make_meta,
) {
debug(asserts) {
static assert(is(typeof(line) == char[]));
@@ -3420,7 +3416,7 @@ void _table_block_(L,O,T,Ma)(
comp_obj_heading,
cntr,
obj_type_status,
- dochead_make_aa
+ conf_make_meta,
);
} else {
debug(table) {
@@ -3456,7 +3452,7 @@ process and use an_object["table_head"] (then empty it)
#+name: abs_functions_block_line_status_empty
#+BEGIN_SRC d
-void _table_closed_make_special_notation_table_(N)(
+void _table_closed_make_special_notation_table_(N,CMM)(
char[] line,
return ref string[string] an_object,
return ref ObjGenericComposite[] the_document_body_section,
@@ -3464,7 +3460,7 @@ void _table_closed_make_special_notation_table_(N)(
return ref ObjGenericComposite _comp_obj_heading,
return ref int cntr,
return ref int[string] obj_type_status,
- string[string][string] dochead_make_aa,
+ CMM conf_make_meta
) {
comp_obj_block = comp_obj_block.init;
obj_cite_digits = ocn_emit(OCNstatus.on);
@@ -3479,7 +3475,7 @@ void _table_closed_make_special_notation_table_(N)(
);
an_object["is"] = "table";
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
comp_obj_block.ocn = obj_cite_digits.on;
comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
@@ -3501,7 +3497,7 @@ void _table_closed_make_special_notation_table_(N)(
#+name: abs_functions_block_line_status_empty
#+BEGIN_SRC d
-void _block_flag_line_empty_(B,N)(
+void _block_flag_line_empty_(B,N,CMM)(
B bookindex_extract_hash,
char[] line,
return ref string[string] an_object,
@@ -3512,7 +3508,7 @@ void _block_flag_line_empty_(B,N)(
return ref int cntr,
return ref int[string] obj_type_status,
string[string] obj_cite_number_poem,
- string[string][string] dochead_make_aa,
+ CMM conf_make_meta,
) {
assert(
line.empty,
@@ -3551,7 +3547,7 @@ void _block_flag_line_empty_(B,N)(
an_object["is"]
);
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
@@ -3601,7 +3597,7 @@ void _block_flag_line_empty_(B,N)(
an_object["is"]
);
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
@@ -3651,7 +3647,7 @@ void _block_flag_line_empty_(B,N)(
an_object["is"]
);
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
comp_obj_block = comp_obj_block.init;
comp_obj_block.of_part = "body";
@@ -3741,7 +3737,7 @@ void _block_flag_line_empty_(B,N)(
an_object["is"]
);
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_code = comp_obj_code.init;
@@ -3792,7 +3788,7 @@ void _block_flag_line_empty_(B,N)(
an_object["is"]
);
auto substantive_obj_misc_tuple =
- obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
comp_obj_block = comp_obj_block.init;
comp_obj_block.ocn = obj_cite_digits.on;
@@ -4054,15 +4050,15 @@ auto _heading_make_set_(L,C,R,T)(
#+name: abs_functions_heading
#+BEGIN_SRC d
-auto _heading_matched_(L,C,O,K,Lv,Lc,T,Me)(
- L line,
- return ref C line_occur,
- return ref O an_object,
- return ref K an_object_key,
- return ref Lv lv,
- return ref Lc collapsed_lev,
- return ref T obj_type_status,
- return ref Me dochead_meta_aa,
+auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)(
+ L line,
+ return ref C line_occur,
+ return ref O an_object,
+ return ref K an_object_key,
+ return ref Lv lv,
+ return ref Lc collapsed_lev,
+ return ref T obj_type_status,
+ return ref CMM conf_make_meta,
) {
debug(asserts) {
static assert(is(typeof(line) == char[]));
@@ -4072,7 +4068,6 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,Me)(
static assert(is(typeof(lv) == int[string]));
static assert(is(typeof(collapsed_lev) == int[string]));
static assert(is(typeof(obj_type_status) == int[string]));
- static assert(is(typeof(dochead_meta_aa) == string[string][string]));
}
static auto rgx = Rgx();
if (auto m = line.match(rgx.heading)) {
@@ -4092,9 +4087,9 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,Me)(
case "A": // Title set
an_object[an_object_key]=(an_object[an_object_key])
.replaceFirst(rgx.variable_doc_title,
- (dochead_meta_aa["title"]["full"] ~ ","))
+ (conf_make_meta.meta.title_full ~ ","))
.replaceFirst(rgx.variable_doc_author,
- dochead_meta_aa["creator"]["author"]);
+ conf_make_meta.meta.creator_author);
collapsed_lev["h0"] = 0;
an_object["lev_collapsed_number"] =
collapsed_lev["h0"].to!string;
@@ -5023,16 +5018,15 @@ static struct ObjInlineMarkup {
#+name: meta_emitters_obj_inline_markup_and_anchor_tags_and_misc
#+BEGIN_SRC d
- auto obj_inline_markup_and_anchor_tags_and_misc(O,K,Ma)(
- O obj_,
- K obj_key_,
- Ma dochead_make_aa
+ auto obj_inline_markup_and_anchor_tags_and_misc(O,K,CMM)(
+ O obj_,
+ K obj_key_,
+ CMM conf_make_meta,
)
in {
debug(asserts) {
static assert(is(typeof(obj_) == string[string]));
static assert(is(typeof(obj_key_) == string));
- static assert(is(typeof(dochead_make_aa) == string[string][string]));
}
}
body {
@@ -5049,7 +5043,7 @@ static struct ObjInlineMarkup {
switch (obj_["is"]) {
case "heading":
static __gshared string anchor_tag = "";
- obj_txt["munge"]=_configured_auto_heading_numbering_and_segment_anchor_tags(obj_txt["munge"], obj_, dochead_make_aa);
+ obj_txt["munge"]=_configured_auto_heading_numbering_and_segment_anchor_tags(obj_txt["munge"], obj_, conf_make_meta);
obj_txt["munge"]=_make_segment_anchor_tags_if_none_provided(obj_txt["munge"], obj_["lev"]);
if (auto m = obj_txt["munge"].match(rgx.heading_anchor_tag)) {
anchor_tag = m.captures[1];
@@ -5125,9 +5119,9 @@ static struct ObjInlineMarkup {
"");
return heading_toc_;
};
- auto table_of_contents_gather_headings(O,Ma,Ts,Ta,X,Toc)(
+ auto table_of_contents_gather_headings(O,CMM,Ts,Ta,X,Toc)(
O obj_,
- Ma dochead_make_aa,
+ CMM conf_make_meta,
Ts segment_anchor_tag_that_object_belongs_to,
Ta _anchor_tag,
return ref X lev4_subtoc,
@@ -5136,7 +5130,6 @@ static struct ObjInlineMarkup {
in {
debug(asserts) {
static assert(is(typeof(obj_) == string[string]));
- static assert(is(typeof(dochead_make_aa) == string[string][string]));
static assert(is(typeof(segment_anchor_tag_that_object_belongs_to) == string));
static assert(is(typeof(_anchor_tag) == string));
static assert(is(typeof(lev4_subtoc) == string[][string]));
@@ -5309,17 +5302,16 @@ private:
#+name: meta_emitters_obj_inline_markup_heading_numbering_segment_anchor_tags
#+BEGIN_SRC d
- static string _configured_auto_heading_numbering_and_segment_anchor_tags(M,O,Ma)(
- M munge_,
- O obj_,
- Ma dochead_make_aa
+ static string _configured_auto_heading_numbering_and_segment_anchor_tags(M,O,CMM)(
+ M munge_,
+ O obj_,
+ CMM conf_make_meta,
) {
debug(asserts) {
static assert(is(typeof(munge_) == string));
static assert(is(typeof(obj_) == string[string]));
- static assert(is(typeof(dochead_make_aa) == string[string][string]));
}
- if (dochead_make_aa["make"]["num_top"].length > 0) {
+ if (conf_make_meta.make.num_top.length > 0) {
static __gshared int heading_num_top_level=9;
static __gshared int heading_num_depth=2;
static __gshared int heading_num_0 = 0;
@@ -5328,10 +5320,10 @@ private:
static __gshared int heading_num_3 = 0;
static __gshared string heading_number_auto_composite = "";
if (heading_num_top_level==9) {
- if (dochead_make_aa["make"]["num_depth"].length > 0) {
- heading_num_depth = dochead_make_aa["make"]["num_depth"].to!uint;
+ if (conf_make_meta.make.num_depth.length > 0) {
+ heading_num_depth = conf_make_meta.make.num_depth.to!uint;
}
- switch (dochead_make_aa["make"]["num_top"]) {
+ switch (conf_make_meta.make.num_top) {
case "A":
break;
case "B":
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org
index 2f06970..67207d4 100644
--- a/org/meta_conf_make_meta.org
+++ b/org/meta_conf_make_meta.org
@@ -15,7 +15,7 @@
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
[[./sdp.org][sdp]] [[./][org/]]
-* 0. header extract (native & sdlang) to AA :module:sdp:meta_conf_make_meta:
+* 0. header extract (native & sdlang) to Struct :module:sdp:meta_conf_make_meta:
** module template
#+BEGIN_SRC d :tangle ../src/sdp/meta/conf_make_meta.d
@@ -30,7 +30,7 @@
program internally. Moved to associative array.
+/
module sdp.meta.conf_make_meta;
-template docHeaderMakeAndMetaTupExtractAndConvertToAA() {
+static template docHeaderMakeAndMetaTupExtractAndConvertToStruct() {
import
std.exception,
std.regex,
@@ -41,31 +41,20 @@ template docHeaderMakeAndMetaTupExtractAndConvertToAA() {
std.conv : to;
import sdlang;
import
- sdp.meta.conf_make_meta_native,
sdp.meta.conf_make_meta_sdlang,
sdp.meta.rgx;
mixin SiSUrgxInit;
- mixin SiSUheaderExtractNative;
mixin SiSUextractSDLang;
static auto rgx = Rgx();
- auto docHeaderMakeAndMetaTupExtractAndConvertToAA(DocMake, Src)(
- DocMake conf_doc_make_aa,
+ auto docHeaderMakeAndMetaTupExtractAndConvertToStruct(CCm, Src)(
+ CCm conf_composite_make,
Src header_src,
) {
- debug(asserts){
- static assert(is(typeof(header_src) == char[]));
- static assert(is(typeof(conf_doc_make_aa) == string[string][string]));
- }
- auto head_native = HeaderDocMetadataAndMakeNativeToAA();
auto header_sdlang_tag = (!(header_src.match(rgx.native_header_meta_title)))
? extractSDL().docHeaderSDLtagGet(header_src) // sdlang.ast.Tag
: null;
- auto header_make_and_meta_tuple = (header_src.match(rgx.native_header_meta_title))
- ? (head_native.headerNativeToAA(header_src))
- : (extractSDL().docHeaderSDLtoAA(conf_doc_make_aa, header_sdlang_tag));
- static assert(!isTypeTuple!(header_make_and_meta_tuple));
- static assert(header_make_and_meta_tuple.length==2);
- return header_make_and_meta_tuple;
+ auto header_make_and_meta_struct = extractSDL().docSDLtoStruct(conf_composite_make, header_sdlang_tag);
+ return header_make_and_meta_struct;
}
}
#+END_SRC
@@ -79,7 +68,7 @@ template docHeaderMakeAndMetaTupExtractAndConvertToAA() {
extract sdlang header return sdlang
+/
module sdp.meta.conf_make_meta_sdlang;
-template SiSUextractSDLang() {
+static template SiSUextractSDLang() {
import
std.exception,
std.regex,
@@ -156,110 +145,179 @@ private auto docHeaderSDLtagGet(Hs)(Hs src_header) {
}
#+END_SRC
-** 2a. _sdlang to associative array_
+** 2a. _sdlang to struct_
#+name: meta_conf_make_meta_sdl
#+BEGIN_SRC d
-private auto sdlangToAA(C,Tag)(C conf, Tag conf_sdlang) {
- debug(asserts){
- static assert(is(typeof(conf) == string[string][string]));
+private auto docSDLtoStruct(C,Tag)(C _conf_composite, Tag header_sdlang) {
+ mixin SiSUregisters;
+ /+ make +/
+ if ("make" in header_sdlang.maybe.tags) {
+ _conf_composite.make_str.bold = _conf_composite.make.bold = extractSDLangTabOrAttrib(header_sdlang, "make", "bold");
+ _conf_composite.make_str.breaks = _conf_composite.make.breaks = extractSDLangTabOrAttrib(header_sdlang, "make", "breaks");
+ _conf_composite.make_str.cover_image = _conf_composite.make.cover_image = extractSDLangTabOrAttrib(header_sdlang, "make", "cover_image");
+ _conf_composite.make_str.css = _conf_composite.make.css = extractSDLangTabOrAttrib(header_sdlang, "make", "css");
+ _conf_composite.make_str.emphasis = _conf_composite.make.emphasis = extractSDLangTabOrAttrib(header_sdlang, "make", "emphasis");
+ _conf_composite.make_str.footer = _conf_composite.make.footer = extractSDLangTabOrAttrib(header_sdlang, "make", "footer");
+ _conf_composite.make_str.headings = _conf_composite.make.headings = extractSDLangTabOrAttrib(header_sdlang, "make", "headings");
+ _conf_composite.make_str.home_button_image = _conf_composite.make.home_button_image = extractSDLangTabOrAttrib(header_sdlang, "make", "home_button_image");
+ _conf_composite.make_str.home_button_text = _conf_composite.make.home_button_text = extractSDLangTabOrAttrib(header_sdlang, "make", "home_button_text");
+ _conf_composite.make_str.italics = _conf_composite.make.italics = extractSDLangTabOrAttrib(header_sdlang, "make", "italics");
+ _conf_composite.make_str.num_top = _conf_composite.make.num_top = extractSDLangTabOrAttrib(header_sdlang, "make", "num_top");
+ _conf_composite.make_str.num_depth = _conf_composite.make.num_depth = extractSDLangTabOrAttrib(header_sdlang, "make", "num_depth");
+ _conf_composite.make_str.substitute = _conf_composite.make.substitute = extractSDLangTabOrAttrib(header_sdlang, "make", "substitute");
+ _conf_composite.make_str.texpdf_font = _conf_composite.make.texpdf_font = extractSDLangTabOrAttrib(header_sdlang, "make", "texpdf_font");
}
- foreach (maintag, subtags; conf) {
- /+ writeln(__LINE__, ": ", maintag, ":- ", subtags); +/
- foreach (subtag, content; subtags) {
- if (maintag in conf_sdlang.maybe.tags) {
- Tag _maintag = conf_sdlang.getTag(maintag);
- if ((subtag in _maintag.maybe.tags)
- && (_maintag.getTagValues(subtag).length > 0)) {
- debug(headersdlang) {
- writeln(__LINE__, ": ", maintag, ":", subtag, ": ", _maintag.getTagValues(subtag)[0]);
- }
- if (_maintag.getTagValues(subtag).length == 1) {
- conf[maintag][subtag] =
- (_maintag.getTagValues(subtag)[0]).to!string;
- } else if (_maintag.getTagValues(subtag).length > 1) {
- foreach (st; _maintag.getTagValues(subtag)) {
- conf[maintag][subtag] ~=
- st.to!string ~ ";";
- }
- }
- } else if ((subtag in _maintag.maybe.attributes)
- && (_maintag.maybe.attributes[subtag][0].value.length > 0)) {
- debug(headersdlang) {
- writeln(__LINE__, ": ", maintag, ":", subtag, ": ", conf_sdlang.tags[maintag][0].attributes[subtag][0].value);
- }
- conf[maintag][subtag] =
- (conf_sdlang.tags[maintag][0].attributes[subtag][0].value).to!string;
- }
- }
- }
+ /+ conf +/
+ if ("webserv" in header_sdlang.maybe.tags) {
+ _conf_composite.conf.webserv_url_root = extractSDLangTabOrAttrib(header_sdlang, "webserv", "url_root");
+ _conf_composite.conf.webserv_path = extractSDLangTabOrAttrib(header_sdlang, "webserv", "path");
+ _conf_composite.conf.webserv_images = extractSDLangTabOrAttrib(header_sdlang, "webserv", "images");
+ _conf_composite.conf.webserv_cgi = extractSDLangTabOrAttrib(header_sdlang, "webserv", "cgi");
+ _conf_composite.conf.webserv_cgi_host = extractSDLangTabOrAttrib(header_sdlang, "webserv", "cgi_host");
+ _conf_composite.conf.webserv_cgi_host_path = extractSDLangTabOrAttrib(header_sdlang, "webserv", "cgi_host_path");
+ _conf_composite.conf.webserv_cgi_port = extractSDLangTabOrAttrib(header_sdlang, "webserv", "cgi_port");
+ _conf_composite.conf.webserv_cgi_user = extractSDLangTabOrAttrib(header_sdlang, "webserv", "cgi_user");
+ _conf_composite.conf.webserv_cgi_file_links = extractSDLangTabOrAttrib(header_sdlang, "webserv", "cgi_file_links");
}
- return conf;
-}
-#+END_SRC
-
-** 2b. sdlang header to _associative array_ make sdlTag in :sdlang:aa:
-
-#+name: meta_conf_make_meta_sdl
-#+BEGIN_SRC d
-private auto docHeaderSDLtoAA(Ma, Tag)(Ma dochead_make, Tag header_sdlang) {
- debug(asserts){
- static assert(is(typeof(dochead_make) == string[string][string]));
+ if ("processing" in header_sdlang.maybe.tags) {
+ _conf_composite.conf.processing_path = extractSDLangTabOrAttrib(header_sdlang, "webserv", "processing_path");
+ _conf_composite.conf.processing_dir = extractSDLangTabOrAttrib(header_sdlang, "webserv", "processing_dir");
+ _conf_composite.conf.processing_concord_max = extractSDLangTabOrAttrib(header_sdlang, "webserv", "processing_concord_max");
+ }
+ if("flag" in header_sdlang.maybe.tags) {
+ _conf_composite.conf.flag_act0 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act0");
+ _conf_composite.conf.flag_act1 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act1");
+ _conf_composite.conf.flag_act2 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act2");
+ _conf_composite.conf.flag_act3 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act3");
+ _conf_composite.conf.flag_act4 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act4");
+ _conf_composite.conf.flag_act5 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act5");
+ _conf_composite.conf.flag_act6 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act6");
+ _conf_composite.conf.flag_act7 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act7");
+ _conf_composite.conf.flag_act8 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act8");
+ _conf_composite.conf.flag_act9 = extractSDLangTabOrAttrib(header_sdlang, "flag", "act9");
+ }
+ if ("default" in header_sdlang.maybe.tags) {
+ _conf_composite.conf.default_papersize = extractSDLangTabOrAttrib(header_sdlang, "default", "papersize");
+ _conf_composite.conf.default_text_wrap = extractSDLangTabOrAttrib(header_sdlang, "default", "text_wrap");
+ _conf_composite.conf.default_emphasis = extractSDLangTabOrAttrib(header_sdlang, "default", "emphasis");
+ _conf_composite.conf.default_language = extractSDLangTabOrAttrib(header_sdlang, "default", "language");
+ _conf_composite.conf.default_digest = extractSDLangTabOrAttrib(header_sdlang, "default", "digest");
+ }
+ if ("search" in header_sdlang.maybe.tags) {
+ _conf_composite.conf.search_flag = extractSDLangTabOrAttrib(header_sdlang, "search", "flag");
+ _conf_composite.conf.search_action = extractSDLangTabOrAttrib(header_sdlang, "search", "action");
+ _conf_composite.conf.search_db = extractSDLangTabOrAttrib(header_sdlang, "search", "db");
+ _conf_composite.conf.search_title = extractSDLangTabOrAttrib(header_sdlang, "search", "title");
}
- dochead_make = sdlangToAA(dochead_make, header_sdlang);
- auto dochead_meta = sdlangToAA(meta_aa_empty, header_sdlang);
- if (dochead_meta["title"]["main"].empty) {
- {
+ /+ meta +/
+ if ("classify" in header_sdlang.maybe.tags) {
+ _conf_composite.meta.classify_dewey = extractSDLangTabOrAttrib(header_sdlang, "classify", "dewey");
+ _conf_composite.meta.classify_keywords = extractSDLangTabOrAttrib(header_sdlang, "classify", "keywords");
+ _conf_composite.meta.classify_loc = extractSDLangTabOrAttrib(header_sdlang, "classify", "loc");
+ _conf_composite.meta.classify_subject = extractSDLangTabOrAttrib(header_sdlang, "classify", "subject");
+ _conf_composite.meta.classify_topic_register = extractSDLangTabOrAttrib(header_sdlang, "classify", "topic_register");
+ }
+ if ("date" in header_sdlang.maybe.tags) {
+ _conf_composite.meta.date_added_to_site = extractSDLangTabOrAttrib(header_sdlang, "date", "added_to_site");
+ _conf_composite.meta.date_available = extractSDLangTabOrAttrib(header_sdlang, "date", "available");
+ _conf_composite.meta.date_created = extractSDLangTabOrAttrib(header_sdlang, "date", "created");
+ _conf_composite.meta.date_issued = extractSDLangTabOrAttrib(header_sdlang, "date", "issued");
+ _conf_composite.meta.date_modified = extractSDLangTabOrAttrib(header_sdlang, "date", "modified");
+ _conf_composite.meta.date_published = extractSDLangTabOrAttrib(header_sdlang, "date", "published");
+ _conf_composite.meta.date_valid = extractSDLangTabOrAttrib(header_sdlang, "date", "valid");
+ }
+ if("identifier" in header_sdlang.maybe.tags) {
+ _conf_composite.meta.identifier_isbn = extractSDLangTabOrAttrib(header_sdlang, "identifier", "isbn");
+ _conf_composite.meta.identifier_oclc = extractSDLangTabOrAttrib(header_sdlang, "identifier", "oclc");
+ _conf_composite.meta.identifier_pg = extractSDLangTabOrAttrib(header_sdlang, "identifier", "pg");
+ }
+ if ("links" in header_sdlang.maybe.tags) {
+ // _conf_composite.meta.links = extractSDLangTabOrAttrib(header_sdlang, "links", "");
+ }
+ if ("notes" in header_sdlang.maybe.tags) {
+ _conf_composite.meta.notes_abstract = extractSDLangTabOrAttrib(header_sdlang, "notes", "abstract");
+ _conf_composite.meta.notes_description = extractSDLangTabOrAttrib(header_sdlang, "notes", "description");
+ }
+ if ("original" in header_sdlang.maybe.tags) {
+ _conf_composite.meta.original_language = extractSDLangTabOrAttrib(header_sdlang, "original", "language");
+ _conf_composite.meta.original_source = extractSDLangTabOrAttrib(header_sdlang, "original", "source");
+ _conf_composite.meta.original_title = extractSDLangTabOrAttrib(header_sdlang, "original", "title");
+ }
+ if ("publisher" in header_sdlang.maybe.tags) {
+ // _conf_composite.meta.publisher = extractSDLangTabOrAttrib(header_sdlang, "publisher", "");
+ }
+ if ("rights" in header_sdlang.maybe.tags) {
+ _conf_composite.meta.rights_copyright = extractSDLangTabOrAttrib(header_sdlang, "rights", "copyright");
+ _conf_composite.meta.rights_cover = extractSDLangTabOrAttrib(header_sdlang, "rights", "cover");
+ _conf_composite.meta.rights_illustrations = extractSDLangTabOrAttrib(header_sdlang, "rights", "illustrations");
+ _conf_composite.meta.rights_license = extractSDLangTabOrAttrib(header_sdlang, "rights", "license");
+ }
+ if (_conf_composite.meta.creator_author.empty) {
+ if ("creator" in header_sdlang.maybe.tags) {
+ _conf_composite.meta.creator_author = extractSDLangTabOrAttrib(header_sdlang, "creator", "author");
+ _conf_composite.meta.creator_author_email = extractSDLangTabOrAttrib(header_sdlang, "creator", "author_email");
+ _conf_composite.meta.creator_illustrator = extractSDLangTabOrAttrib(header_sdlang, "creator", "illustrator");
+ _conf_composite.meta.creator_translator = extractSDLangTabOrAttrib(header_sdlang, "creator", "translator");
+ }
+ // dochead_meta["creator"]["author_raw"] = dochead_meta["creator"]["author"];
+ string[] authors_arr;
+ auto authors_raw_arr = _conf_composite.meta.creator_author.split(rgx.arr_delimiter);
+ foreach (author_raw; authors_raw_arr) {
+ authors_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
+ }
+ _conf_composite.meta.creator_author = join(authors_arr, ", ").chomp.chomp;
+ }
+ if (_conf_composite.meta.title_main.empty) {
+ if ("title" in header_sdlang.maybe.tags) {
+ _conf_composite.meta.title_edition = extractSDLangTabOrAttrib(header_sdlang, "title", "edition");
+ _conf_composite.meta.title_language = extractSDLangTabOrAttrib(header_sdlang, "title", "language");
+ _conf_composite.meta.title_main = extractSDLangTabOrAttrib(header_sdlang, "title", "main");
+ _conf_composite.meta.title_note = extractSDLangTabOrAttrib(header_sdlang, "title", "note");
+ _conf_composite.meta.title_sub = extractSDLangTabOrAttrib(header_sdlang, "title", "sub");
+ _conf_composite.meta.title_subtitle = extractSDLangTabOrAttrib(header_sdlang, "title", "subtitle");
+ }
+ if (_conf_composite.meta.title_main.empty) {
Tag _maintag = header_sdlang.getTag("title");
if (_maintag !is null) {
if ("main" in _maintag.maybe.tags) {
- dochead_meta["title"]["main"] =
+ _conf_composite.meta.title_main =
to!string(_maintag.getTagValues("main"));
} else if ("main" !in _maintag.maybe.attributes) {
writeln(__LINE__, ": ", _maintag.values[0]);
- dochead_meta["title"]["main"] =
+ _conf_composite.meta.title_main =
(_maintag.values[0]).to!string; // test that this exists
}
}
}
+ if ((!(_conf_composite.meta.title_subtitle.empty))
+ && (_conf_composite.meta.title_sub.empty)) {
+ _conf_composite.meta.title_sub = _conf_composite.meta.title_subtitle;
+ }
+ if (_conf_composite.meta.title_sub.empty) {
+ _conf_composite.meta.title_full = _conf_composite.meta.title_main;
+ } else {
+ _conf_composite.meta.title_full = format(
+ "%s - %s",
+ _conf_composite.meta.title_main,
+ _conf_composite.meta.title_sub,
+ );
+ }
}
- if (!(dochead_meta["title"]["subtitle"].empty)
- && (dochead_meta["title"]["sub"].empty)) {
- dochead_meta["title"]["sub"] ~= dochead_meta["title"]["subtitle"];
- }
- dochead_meta["title"].remove("subtitle");
- if (dochead_meta["title"]["sub"].empty) {
- dochead_meta["title"]["full"] ~= dochead_meta["title"]["main"];
- } else {
- dochead_meta["title"]["full"] ~= format(
- "%s - %s",
- dochead_meta["title"]["main"],
- dochead_meta["title"]["sub"],
- );
- }
- dochead_meta["creator"]["author_raw"] = dochead_meta["creator"]["author"];
- string[] authors_arr;
- auto authors_raw_arr = dochead_meta["creator"]["author"].split(rgx.arr_delimiter);
- foreach (author_raw; authors_raw_arr) {
- authors_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
- }
- dochead_meta["creator"]["author"] = join(authors_arr, ", ").chomp.chomp;
- auto t = tuple(dochead_make, dochead_meta);
- static assert(t.length==2);
- return t;
+ return _conf_composite;
}
#+END_SRC
-* B. module native document header :module:sdp:meta_conf_make_meta_native:
-** module template
+* C. module conf files make composite
+** TODO 0. module template
-#+BEGIN_SRC d :tangle ../src/sdp/meta/conf_make_meta_native.d
+#+BEGIN_SRC d :tangle ../src/sdp/meta/conf_make_meta_composite.d
/++
- native headers using<br>@title:<BR>:subtitle:<BR>type tags<BR>
- extract native/orig header return associative array
+ return composite make from config files
+/
-module sdp.meta.conf_make_meta_native;
-template SiSUheaderExtractNative() {
+module sdp.meta.conf_make_meta_composite;
+<<meta_conf_make_meta_composite_struct>>
+template confFilesSDLtoStruct() {
import
std.exception,
std.regex,
@@ -272,460 +330,39 @@ template SiSUheaderExtractNative() {
import
sdp.meta.defaults,
sdp.meta.rgx;
- struct HeaderDocMetadataAndMakeNativeToAA {
- mixin SiSUregisters;
- mixin SiSUrgxInitFlags;
- mixin SiSUrgxInit;
- static auto rgx = Rgx();
- enum State { off, on }
- string hm, hs;
- <<meta_markup_header_extract_native>>
- }
+ <<meta_conf_make_meta_composite>>
}
#+END_SRC
-** native header document metadata in associative array :aa:
-
-#+name: meta_markup_header_extract_native
-#+BEGIN_SRC d
-auto header_metadata_and_make_aa(H,Me,Ma)(
- H header,
- Me dochead_meta,
- Ma dochead_make
-)
-in {
- debug(asserts){
- static assert(is(typeof(header) == string));
- static assert(is(typeof(dochead_meta) == string[string][string]));
- static assert(is(typeof(dochead_make) == string[string][string]));
- }
-}
-body {
- scope(exit) {
- destroy(header);
- destroy(dochead_meta);
- destroy(dochead_make);
- }
- if (auto t = header.match(rgx.native_header_main)) {
- char[][] header_obj_spl =
- (cast(char[]) header).split(rgx.line_delimiter_ws_strip);
- auto hm = to!string(t.captures[1]);
- if (hm.match(rgx.main_headers)) {
- foreach (line; header_obj_spl) {
- if (auto m = line.match(rgx.native_header_main)) {
- if (!empty(m.captures[2])) {
- if (hm == "creator") {
- dochead_meta[hm]["author"] =
- to!string(m.captures[2]);
- } else if (hm == "title") {
- dochead_meta[hm]["main"] =
- to!string(m.captures[2]);
- } else if (hm == "publisher") {
- dochead_meta[hm]["name"] =
- to!string(m.captures[2]);
- }
- }
- } else if (auto s = match(line, rgx.native_header_sub)) {
- if (!empty(s.captures[2])) {
- auto hs = to!string(s.captures[1]);
- if ((hm == "make" )
- && (dochead_make[hm])) {
- switch (hm) {
- case "make":
- if (hs.match(rgx.native_subhead_make)) {
- if (dochead_make[hm][hs]) {
- dochead_make[hm][hs] = to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- default:
- break;
- }
- } else if (dochead_meta[hm]) {
- switch (hm) {
- case "creator":
- if (hs.match(rgx.native_subhead_creator)) {
- if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "title":
- if (hs.match(rgx.native_subhead_title)) {
- if ((hs == "subtitle")
- && (dochead_meta[hm]["sub"])) {
- dochead_meta[hm]["sub"] =
- to!string(s.captures[2]);
- } else if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "rights":
- if (hs.match(rgx.native_subhead_rights)) {
- if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "date":
- if (hs.match(rgx.native_subhead_date)) {
- if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "original":
- if (hs.match(rgx.native_subhead_original)) {
- if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "classify":
- if (hs.match(rgx.native_subhead_classify)) {
- if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "identifier":
- if (hs.match(rgx.native_subhead_identifier)) {
- if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "notes":
- if (hs.match(rgx.native_subhead_notes)) {
- if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "publisher":
- if (hs.match(rgx.native_subhead_publisher)) {
- if (dochead_meta[hm][hs]) {
- dochead_meta[hm][hs] =
- to!string(s.captures[2]);
- }
- } else {
- writeln("not a valid header type:", hm, ":", hs);
- destroy(hm);
- destroy(hs);
- }
- break;
- case "links":
- destroy(hm);
- destroy(hs);
- break;
- default:
- break;
- }
- }
- }
- }
- }
- } else {
- writeln("not a valid header type:", hm);
- }
- }
- auto t = tuple(dochead_meta, dochead_make);
- static assert(t.length==2);
- return t;
-}
-#+END_SRC
-
-** native header extract to string object :string:
-
-#+name: meta_markup_header_extract_native
-#+BEGIN_SRC d
-private auto native_header_extract(L,Lo,O,T)(
- L line,
- return ref Lo line_occur,
- return ref O an_object,
- return ref T type
-) {
- debug(asserts){
- static assert(is(typeof(line) == char[]));
- static assert(is(typeof(line_occur) == int[string]));
- static assert(is(typeof(an_object) == string[string]));
- static assert(is(typeof(type) == int[string]));
- }
- if (line.matchFirst(rgx.native_header_make)) { /+ matched header_make +/
- debug(header1) { /+ writeln(line); +/ }
- type["header"] = State.on;
- type["header_make"] = State.on;
- type["header_meta"] = State.off;
- ++line_occur["header_make"];
- an_object["body_nugget"] ~= line ~= "\n";
- } else if (line.matchFirst(rgx.native_header)) { /+ matched header_metadata +/
- /+ (generic header match and not previously caught by header_make) +/
- debug(header1) { /+ writeln(line); +/ }
- type["header"] = State.on;
- type["header_make"] = State.off;
- type["header_meta"] = State.on;
- ++line_occur["header_meta"];
- an_object["body_nugget"] ~= line ~= "\n";
- } else if (type["header_make"] == State.on
- && (line_occur["header_make"] > State.off)) { /+ header_make flag set +/
- if (line.matchFirst(rgx.native_header_sub)) { /+ sub-header +/
- debug(header1) { /+ writeln(line); +/ }
- ++line_occur["header_make"];
- an_object["body_nugget"] ~= line ~= "\n";
- }
- } else if (type["header_meta"] == State.on
- && (line_occur["header_meta"] > State.off)) { /+ header_metadata flag set +/
- if (line.matchFirst(rgx.native_header_sub)) { /+ sub-header +/
- debug(header1) { /+ writeln(line); +/ }
- ++line_occur["header_meta"];
- an_object["body_nugget"] ~= line ~= "\n";
- }
- }
- return an_object;
-}
-#+END_SRC
-
-** native header reset states :reset:
-
-#+name: meta_markup_header_extract_native
-#+BEGIN_SRC d
-auto header_reset_states_common(Lo,O,T)(
- return ref Lo line_occur,
- return ref O an_object,
- return ref T type
-) {
- debug(asserts){
- static assert(is(typeof(line_occur) == int[string]));
- static assert(is(typeof(an_object) == string[string]));
- static assert(is(typeof(type) == int[string]));
- }
- line_occur["header_make"] = State.off;
- line_occur["header_meta"] = State.off;
- type["header"] = State.off;
- an_object.remove("body_nugget");
- an_object.remove("is");
- an_object.remove("attrib");
-}
-#+END_SRC
-
-** hub: native header start :hub:
+** module template
-#+name: meta_markup_header_extract_native
+#+name: meta_conf_make_meta_composite
#+BEGIN_SRC d
-private auto headerNativeToAA(Hn)(Hn src_header) {
- debug(asserts){
- static assert(is(typeof(src_header) == char[]));
- }
- auto type = flags_type_init;
- type = [
- "header" : State.off,
- "header_make" : State.off,
- "header_meta" : State.off,
- ];
- string[string] an_object;
- int[string] line_occur;
- auto dochead_make = conf_aa_empty;
- auto dochead_meta = meta_aa_empty;
- auto set_header = HeaderDocMetadataAndMakeNativeToAA();
- char[][] source_header_arr =
- (cast(char[]) src_header).split(rgx.newline_eol_delimiter);
- foreach(header_line; source_header_arr) {
- if (auto m = header_line.matchFirst(rgx.comment)) {
- /+ matched comment +/
- debug(comment) {
- }
- header_reset_states_common(line_occur, an_object, type);
- } else if ((header_line.matchFirst(rgx.native_header))
- || (type["header_make"] == State.on
- && (line_occur["header_make"] > State.off))
- || (type["header_meta"] == State.on
- && (line_occur["header_meta"] > State.off))) {
- if (header_line.length == 0) {
- /+ header_make instructions (current line empty) +/
- auto dochead_metadata_and_make =
- set_header.header_metadata_and_make_aa(strip(an_object["body_nugget"]), dochead_meta, dochead_make);
- static assert(!isTypeTuple!(dochead_metadata_and_make));
- dochead_meta = dochead_metadata_and_make[0];
- dochead_make = dochead_metadata_and_make[1];
- header_reset_states_common(line_occur, an_object, type);
- type["header_make"] = State.off;
- type["header_meta"] = State.off;
- debug(headersdlang) {
- writeln(dochead_metadata_and_make);
- }
- } else {
- an_object = native_header_extract(header_line, line_occur, an_object, type);
- }
- }
- }
- auto t = tuple(
- dochead_make,
- dochead_meta,
- );
- return t;
-}
-#+END_SRC
-
-* 0. composite make :module:sdp:meta_composite_make:
-** TODO 0. template
-*** composite make
-
-#+BEGIN_SRC d :tangle ../src/sdp/meta/composite_make.d
-/++
- output hub<BR>
- check & generate output types requested
-+/
-module sdp.meta.composite_make;
-template compositeMkCnf() {
- <<imports>>
- mixin SiSUrgxInit;
- string[] _substitutions;
- string[string][] _sub;
- string _bold;
- string _italics;
- string _emphasis;
- auto compositeMkCnf(Mks...)(Mks makes) {
- static auto rgx = Rgx();
- foreach (make; makes) {
- if (auto z = "make" in make) {
- if (auto x = "substitute" in *z) {
- foreach (m; (*x).matchAll(rgx.make_simple_substitutions_d)) {
- _sub ~= ["match": (m["match"]), "replace": (m["replace"])];
- _substitutions ~= format("`%s`,\"%s\"",
- m["match"],
- m["replace"],
- );
- }
- foreach (m; (*x).matchAll(rgx.make_simple_substitutions_rb)) {
- _sub ~= ["match": (m["match"]), "replace": (m["replace"])];
- _substitutions ~= format("`%s`,\"%s\"",
- m["match"],
- m["replace"],
- );
- }
- }
- if (auto x = "bold" in *z) {
- _bold = (*x).to!string;
- }
- if (auto x = "italics" in *z) {
- _italics = (*x).to!string;
- }
- if (auto x = "emphasis" in *z) {
- _emphasis = (*x).to!string;
- }
- }
- }
- struct _composite_make {
- auto substitutions() {
- auto _k = _sub;
- return _k;
- }
- auto substitute() {
- auto _k = _substitutions;
- return _k;
- }
- auto italics() {
- auto _k = _italics;
- return _k;
- }
- auto bold() {
- auto _k = _bold;
- return _k;
- }
- auto emphasis() {
- auto _k = _emphasis;
- return _k;
- }
- }
- return _composite_make();
- }
-}
-#+END_SRC
-
-*** composite make aa
-#+BEGIN_SRC d :tangle ../src/sdp/meta/composite_make.d
-/++
- output hub<BR>
- check & generate output types requested
-+/
-template compositeMkCnfAA() {
- <<imports>>
- mixin SiSUrgxInit;
- string[] _substitutions;
- string[string][] _sub;
- static auto rgx = Rgx();
- auto compositeMkCnfAA(Mks...)(Mks makes) {
- /+
- - skip.first_make which is the "composite make output"
- - pass config files as associative arrays,
- - skip.last_make which is getopt, treat separately
- +/
- auto _composite_make = makes[0];
- auto _opts = makes[$-1];
- foreach (make; makes[1..$-1]) {
- if (auto z = "make" in make) { // document head: make (part of individual document)
- if (auto x = "substitute" in *z) {
- _composite_make["make"]["substitute"] = *x;
- }
- if (auto x = "italics" in *z) {
- _composite_make["make"]["italics"] = *x;
- }
- if (auto x = "bold" in *z) {
- _composite_make["make"]["bold"] = *x;
- }
- if (auto x = "emphasis" in *z) {
- _composite_make["make"]["emphasis"] = *x;
- }
- }
+auto confFilesSDLtoStruct(S,L)(
+ S sdl_root_config_share,
+ L sdl_root_config_local,
+){
+ mixin SiSUregisters;
+ ConfCompositePlus _conf_composite;
+ foreach (conf_sdlang; [sdl_root_config_share, sdl_root_config_local]) {
+ if ("make" in conf_sdlang.maybe.tags) {
+ _conf_composite.make_str.bold = _conf_composite.make.bold = extractSDLangTabOrAttrib(conf_sdlang, "make", "bold");
+ _conf_composite.make_str.breaks = _conf_composite.make.breaks = extractSDLangTabOrAttrib(conf_sdlang, "make", "breaks");
+ _conf_composite.make_str.cover_image = _conf_composite.make.cover_image = extractSDLangTabOrAttrib(conf_sdlang, "make", "cover_image");
+ _conf_composite.make_str.css = _conf_composite.make.css = extractSDLangTabOrAttrib(conf_sdlang, "make", "css");
+ _conf_composite.make_str.emphasis = _conf_composite.make.emphasis = extractSDLangTabOrAttrib(conf_sdlang, "make", "emphasis");
+ _conf_composite.make_str.footer = _conf_composite.make.footer = extractSDLangTabOrAttrib(conf_sdlang, "make", "footer");
+ _conf_composite.make_str.headings = _conf_composite.make.headings = extractSDLangTabOrAttrib(conf_sdlang, "make", "headings");
+ _conf_composite.make_str.home_button_image = _conf_composite.make.home_button_image = extractSDLangTabOrAttrib(conf_sdlang, "make", "home_button_image");
+ _conf_composite.make_str.home_button_text = _conf_composite.make.home_button_text = extractSDLangTabOrAttrib(conf_sdlang, "make", "home_button_text");
+ _conf_composite.make_str.italics = _conf_composite.make.italics = extractSDLangTabOrAttrib(conf_sdlang, "make", "italics");
+ _conf_composite.make_str.num_top = _conf_composite.make.num_top = extractSDLangTabOrAttrib(conf_sdlang, "make", "num_top");
+ _conf_composite.make_str.num_depth = _conf_composite.make.num_depth = extractSDLangTabOrAttrib(conf_sdlang, "make", "num_depth");
+ _conf_composite.make_str.substitute = _conf_composite.make.substitute = extractSDLangTabOrAttrib(conf_sdlang, "make", "substitute");
+ _conf_composite.make_str.texpdf_font = _conf_composite.make.texpdf_font = extractSDLangTabOrAttrib(conf_sdlang, "make", "texpdf_font");
}
- /+ logic for adding _opts make instructions to _composite make +/
- return _composite_make;
}
+ return _conf_composite;
}
#+END_SRC
diff --git a/org/meta_debugs.org b/org/meta_debugs.org
index 6a6f1fa..8d11c89 100644
--- a/org/meta_debugs.org
+++ b/org/meta_debugs.org
@@ -502,19 +502,19 @@ debug(headermakejson) {
writefln(
"%s\n%s\n%s",
"document header, metadata & make instructions:",
- doc_matters.dochead_meta,
+ doc_matters.conf_make_meta.meta,
ptr_head_main,
);
foreach (main_header; ptr_head_main) {
switch (main_header) {
case "make":
foreach (sub_header; ptr_head_sub_make) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
@@ -534,115 +534,115 @@ debug(headermetadatajson) {
writefln(
"%s\n%s\n%s",
"document header, metadata & make instructions:",
- doc_matters.dochead_meta,
+ doc_matters.conf_make_meta.meta,
ptr_head_main,
);
foreach (main_header; ptr_head_main) {
switch (main_header) {
case "creator":
foreach (sub_header; ptr_head_sub_creator) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full,
);
}
}
break;
case "title":
foreach (sub_header; ptr_head_sub_title) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
break;
case "rights":
foreach (sub_header; ptr_head_sub_rights) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
break;
case "date":
foreach (sub_header; ptr_head_sub_date) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
break;
case "original":
foreach (sub_header; ptr_head_sub_original) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
break;
case "classify":
foreach (sub_header; ptr_head_sub_classify) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
break;
case "identifier":
foreach (sub_header; ptr_head_sub_identifier) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
break;
case "notes":
foreach (sub_header; ptr_head_sub_notes) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
break;
case "publisher":
foreach (sub_header; ptr_head_sub_publisher) {
- if (doc_matters.dochead_meta[main_header][sub_header].to!string.length > 2) {
+ if (doc_matters.conf_make_meta.meta.title_full.to!string.length > 2) {
writefln(
"%s:%s: %s",
main_header,
sub_header,
- doc_matters.dochead_meta[main_header][sub_header]
+ doc_matters.conf_make_meta.meta.title_full
);
}
}
diff --git a/org/meta_read_source_files.org b/org/meta_read_source_files.org
index c8355ae..c7fe354 100644
--- a/org/meta_read_source_files.org
+++ b/org/meta_read_source_files.org
@@ -44,13 +44,27 @@ module sdp.meta.read_config_files;
#+name: meta_config_file_in
#+BEGIN_SRC d
-template configIn() {
+static template configIn() {
<<imports_std>>
final string configIn(C,E)(C conf_sdl, E env) {
+ /+ FIX clean up conf paths ↓ +/
+ string sisudoc_conf_pwd = chainPath(to!string(env["pwd"]), "sisudoc/conf").array;
+ string sisudoc_conf_pwd_a = chainPath(to!string(env["pwd"]), "conf").array;
+ string sisudoc_conf_pwd_b = chainPath(to!string(env["pwd"]), "../conf").array;
+ string sisudoc_conf_pwd_c = chainPath(to!string(env["pwd"]), "../../conf").array;
+ string sisudoc_conf_pwd_d = chainPath(to!string(env["pwd"]), "../../../conf").array;
+ /+ FIX clean up conf paths ↑
+ (compare pwd to doc path location, and build config path)
+ +/
string dot_pwd = chainPath(to!string(env["pwd"]), ".sisu").array;
string underscore_pwd = chainPath(to!string(env["pwd"]), "_sisu").array;
string dot_home = chainPath(to!string(env["home"]), ".sisu").array;
string[] possible_config_path_locations = [
+ sisudoc_conf_pwd,
+ sisudoc_conf_pwd_a,
+ sisudoc_conf_pwd_b,
+ sisudoc_conf_pwd_c,
+ sisudoc_conf_pwd_d,
dot_pwd,
underscore_pwd,
dot_home,
@@ -63,6 +77,9 @@ template configIn() {
pth,
conf_sdl,
);
+ if (config_file_str.length > 0) {
+ break;
+ }
try {
if (exists(conf_file)) {
debug(configfile) {
@@ -89,7 +106,7 @@ template configIn() {
/+
+/
-template ConfigSDLang() {
+static template ConfigSDLang() {
import sdlang;
<<imports_std>>
<<meta_config_file_sdlang>>
@@ -120,7 +137,7 @@ auto ConfigSDLang(string configuration, string conf_sdl_filename) {
#+BEGIN_SRC d
/+
+/
-template configRead() {
+static template configRead() {
<<imports_std>>
<<meta_config_file_import_sdlang>>
<<meta_config_file_sdlang_hub>>
@@ -156,7 +173,7 @@ final auto configRead(C,E)(C conf_sdl, E env) {
- if master file scan for addional files to import/insert
+/
module sdp.meta.read_source_files;
-template SiSUrawMarkupContent() {
+static template SiSUrawMarkupContent() {
import
sdp.meta.rgx;
<<imports_std>>
diff --git a/org/output_sqlite.org b/org/output_sqlite.org
index d3f6745..2ae42ef 100644
--- a/org/output_sqlite.org
+++ b/org/output_sqlite.org
@@ -815,82 +815,81 @@ either:
#+name: sqlite_insert_metadata_and_src_text
#+BEGIN_SRC d
-insert_metadata.bind(":title", doc_matters.dochead_meta["title"]["full"]);
-// insert_metadata.bind(":title_main", doc_matters.dochead_meta["title"]["full"]);
-// insert_metadata.bind(":title_sub", doc_matters.dochead_meta["title"][""]);
-// insert_metadata.bind(":title_short", doc_matters.dochead_meta["title"][""]);
-// insert_metadata.bind(":title_edition", doc_matters.dochead_meta["title"][""]);
-// insert_metadata.bind(":title_note", doc_matters.dochead_meta["title"][""]);
-// insert_metadata.bind(":title_language", doc_matters.dochead_meta["title"][""]);
-// insert_metadata.bind(":title_language_char", doc_matters.dochead_meta["title"][""]);
-insert_metadata.bind(":creator_author", doc_matters.dochead_meta["creator"]["author"]);
-// insert_metadata.bind(":creator_author_hon", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_author_nationality", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_editor", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_contributor", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_illustrator", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_photographer", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_translator", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_prepared_by", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_digitized_by", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_audio", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":creator_video", doc_matters.dochead_meta["creator"][""]);
-// insert_metadata.bind(":language_document", doc_matters.dochead_meta["language"][""]);
-// insert_metadata.bind(":language_document_char", doc_matters.dochead_meta["language"][""]);
-// insert_metadata.bind(":language_original", doc_matters.dochead_meta["language"][""]);
-// insert_metadata.bind(":language_original_char", doc_matters.dochead_meta["language"][""]);
-// insert_metadata.bind(":date_added_to_site", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_available", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_created", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_issued", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_modified", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_published", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_valid", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_translated", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_original_publication", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":date_generated", doc_matters.dochead_meta["date"][""]);
-// insert_metadata.bind(":publisher", doc_matters.dochead_meta["publisher"][""]);
-// insert_metadata.bind(":original_publisher", doc_matters.dochead_meta["original"][""]);
-// insert_metadata.bind(":original_language", doc_matters.dochead_meta["original"][""]);
-// insert_metadata.bind(":original_language_char", doc_matters.dochead_meta["original"][""]);
-// insert_metadata.bind(":original_source", doc_matters.dochead_meta["original"][""]);
-// insert_metadata.bind(":original_institution", doc_matters.dochead_meta["original"][""]);
-// insert_metadata.bind(":original_nationality", doc_matters.dochead_meta["original"][""]);
-// insert_metadata.bind(":rights", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_copyright_text", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_copyright_translation", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_copyright_illustrations", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_copyright_photographs", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_copyright_preparation", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_copyright_digitization", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_copyright_audio", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_copyright_video", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":rights_license", doc_matters.dochead_meta["rights"][""]);
-// insert_metadata.bind(":identifier_oclc", doc_matters.dochead_meta["identifier"][""]);
-// insert_metadata.bind(":identifier_isbn", doc_matters.dochead_meta["identifier"][""]);
-// insert_metadata.bind(":classify_topic_register", doc_matters.dochead_meta["classify"][""]);
-// insert_metadata.bind(":classify_subject", doc_matters.dochead_meta["classify"][""]);
-// insert_metadata.bind(":classify_loc", doc_matters.dochead_meta["classify"][""]);
-// insert_metadata.bind(":classify_loc", doc_matters.dochead_meta["classify"][""]);
-// insert_metadata.bind(":notes_abstract", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_description", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_comment", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_coverage", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_relation", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_history", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_type", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_format", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_prefix", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_prefix_a", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_prefix_b", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":notes_suffix", doc_matters.dochead_meta["notes"][""]);
-// insert_metadata.bind(":src_filename", doc_matters.dochead_meta["src"][""]);
-// insert_metadata.bind(":src_fingerprint", doc_matters.dochead_meta["src"][""]);
-// insert_metadata.bind(":src_filesize", doc_matters.dochead_meta["src"][""]);
-// insert_metadata.bind(":src_wordcount", doc_matters.dochead_meta["src"][""]);
-// insert_metadata.bind(":src_text", doc_matters.dochead_meta["src"][""]);
-// insert_metadata.bind(":fulltext", doc_matters.dochead_meta["fulltext"][""]);
-// insert_metadata.bind(":links", doc_matters.dochead_meta["links"][""]);
+insert_metadata.bind(":title", doc_matters.conf_make_meta.meta.title_full);
+// insert_metadata.bind(":title_main", doc_matters.conf_make_meta.meta.title_main);
+// insert_metadata.bind(":title_sub", doc_matters.conf_make_meta.meta.title_subtitle);
+// insert_metadata.bind(":title_short", doc_matters.conf_make_meta.meta.title_short); //
+// insert_metadata.bind(":title_edition", doc_matters.conf_make_meta.meta.title_edition);
+// insert_metadata.bind(":title_note", doc_matters.conf_make_meta.meta.title_note);
+// insert_metadata.bind(":title_language", doc_matters.conf_make_meta.meta.title_language);
+// insert_metadata.bind(":title_language_char", doc_matters.conf_make_meta.meta.title_language_char);
+insert_metadata.bind(":creator_author", doc_matters.conf_make_meta.meta.creator_author);
+// insert_metadata.bind(":creator_author_hon", doc_matters.conf_make_meta.meta.creator_author_hon);
+// insert_metadata.bind(":creator_author_nationality", doc_matters.conf_make_meta.meta.creator_author_nationality);
+// insert_metadata.bind(":creator_editor", doc_matters.conf_make_meta.meta.creator_editor);
+// insert_metadata.bind(":creator_contributor", doc_matters.conf_make_meta.meta.creator_contributor);
+// insert_metadata.bind(":creator_illustrator", doc_matters.conf_make_meta.meta.creator_illustrator);
+// insert_metadata.bind(":creator_photographer", doc_matters.conf_make_meta.meta.creator_photographer);
+// insert_metadata.bind(":creator_translator", doc_matters.conf_make_meta.meta.creator_translator);
+// insert_metadata.bind(":creator_prepared_by", doc_matters.conf_make_meta.meta.creator_prepared_by);
+// insert_metadata.bind(":creator_digitized_by", doc_matters.conf_make_meta.meta.creator_digitized_by);
+// insert_metadata.bind(":creator_audio", doc_matters.conf_make_meta.meta.creator_audio);
+// insert_metadata.bind(":creator_video", doc_matters.conf_make_meta.meta.creator_video);
+// insert_metadata.bind(":language_document", doc_matters.conf_make_meta.meta.language_document);
+// insert_metadata.bind(":language_document_char", doc_matters.conf_make_meta.meta.language_document_char);
+// insert_metadata.bind(":language_original", doc_matters.conf_make_meta.meta.language_original);
+// insert_metadata.bind(":language_original_char", doc_matters.conf_make_meta.meta.language_original_char);
+// insert_metadata.bind(":date_added_to_site", doc_matters.conf_make_meta.meta.date_added_to_site);
+// insert_metadata.bind(":date_available", doc_matters.conf_make_meta.meta.date_available);
+// insert_metadata.bind(":date_created", doc_matters.conf_make_meta.meta.date_created);
+// insert_metadata.bind(":date_issued", doc_matters.conf_make_meta.meta.date_issued);
+// insert_metadata.bind(":date_modified", doc_matters.conf_make_meta.meta.date_modified);
+// insert_metadata.bind(":date_published", doc_matters.conf_make_meta.meta.date_published);
+// insert_metadata.bind(":date_valid", doc_matters.conf_make_meta.meta.date_valid);
+// insert_metadata.bind(":date_translated", doc_matters.conf_make_meta.meta.date_translated);
+// insert_metadata.bind(":date_original_publication", doc_matters.conf_make_meta.meta.date_original_publication);
+// insert_metadata.bind(":date_generated", doc_matters.conf_make_meta.meta.date_generated);
+// insert_metadata.bind(":publisher", doc_matters.conf_make_meta.meta.publisher));
+// insert_metadata.bind(":original_publisher", doc_matters.conf_make_meta.meta.original_publisher);
+// insert_metadata.bind(":original_language", doc_matters.conf_make_meta.meta.original_language);
+// insert_metadata.bind(":original_language_char", doc_matters.conf_make_meta.meta.original_language_char);
+// insert_metadata.bind(":original_source", doc_matters.conf_make_meta.meta.original_source);
+// insert_metadata.bind(":original_institution", doc_matters.conf_make_meta.meta.original_institution);
+// insert_metadata.bind(":original_nationality", doc_matters.conf_make_meta.meta.original_nationality);
+// insert_metadata.bind(":rights", doc_matters.conf_make_meta.meta.rights);
+// insert_metadata.bind(":rights_copyright_text", doc_matters.conf_make_meta.meta.rights_copyright_text);
+// insert_metadata.bind(":rights_copyright_translation", doc_matters.conf_make_meta.meta.rights_copyright_translation);
+// insert_metadata.bind(":rights_copyright_illustrations", doc_matters.conf_make_meta.meta.rights_illustrations);
+// insert_metadata.bind(":rights_copyright_photographs", doc_matters.conf_make_meta.meta.rights_photographs);
+// insert_metadata.bind(":rights_copyright_preparation", doc_matters.conf_make_meta.meta.rights_preparation);
+// insert_metadata.bind(":rights_copyright_digitization", doc_matters.conf_make_meta.meta.rights_digitization);
+// insert_metadata.bind(":rights_copyright_audio", doc_matters.conf_make_meta.meta.rights_audio);
+// insert_metadata.bind(":rights_copyright_video", doc_matters.conf_make_meta.meta.rights_video);
+// insert_metadata.bind(":rights_license", doc_matters.conf_make_meta.meta.rights_license);
+// insert_metadata.bind(":identifier_oclc", doc_matters.conf_make_meta.meta.identifier_oclc);
+// insert_metadata.bind(":identifier_isbn", doc_matters.conf_make_meta.meta.identifier_isbn);
+// insert_metadata.bind(":classify_topic_register", doc_matters.conf_make_meta.meta.classify_topic_register);
+// insert_metadata.bind(":classify_subject", doc_matters.conf_make_meta.meta.classify_subject);
+// insert_metadata.bind(":classify_loc", doc_matters.conf_make_meta.meta.classify_loc);
+// insert_metadata.bind(":notes_abstract", doc_matters.conf_make_meta.meta.notes_abstract);
+// insert_metadata.bind(":notes_description", doc_matters.conf_make_meta.meta.notes_description);
+// insert_metadata.bind(":notes_comment", doc_matters.conf_make_meta.meta.notes_comment);
+// insert_metadata.bind(":notes_coverage", doc_matters.conf_make_meta.meta.notes_coverage);
+// insert_metadata.bind(":notes_relation", doc_matters.conf_make_meta.meta.notes_relation);
+// insert_metadata.bind(":notes_history", doc_matters.conf_make_meta.meta.notes_history);
+// insert_metadata.bind(":notes_type", doc_matters.conf_make_meta.meta.notes_type);
+// insert_metadata.bind(":notes_format", doc_matters.conf_make_meta.meta.notes_format);
+// insert_metadata.bind(":notes_prefix", doc_matters.conf_make_meta.meta.notes_prefix);
+// insert_metadata.bind(":notes_prefix_a", doc_matters.conf_make_meta.meta.notes_prefix_a);
+// insert_metadata.bind(":notes_prefix_b", doc_matters.conf_make_meta.meta.notes_prefix_b);
+// insert_metadata.bind(":notes_suffix", doc_matters.conf_make_meta.meta.notes_suffix);
+// insert_metadata.bind(":src_filename", doc_matters.conf_make_meta.meta.src_filename);
+// insert_metadata.bind(":src_fingerprint", doc_matters.conf_make_meta.meta.src_fingerprint);
+// insert_metadata.bind(":src_filesize", doc_matters.conf_make_meta.meta.src_filesize);
+// insert_metadata.bind(":src_wordcount", doc_matters.conf_make_meta.meta.src_wordcount);
+// insert_metadata.bind(":src_text", doc_matters.conf_make_meta.meta.src_text);
+// insert_metadata.bind(":fulltext", doc_matters.conf_make_meta.meta.fulltext);
+// insert_metadata.bind(":links", doc_matters.conf_make_meta.meta.links);
insert_metadata.execute(); insert_metadata.reset();
/+ watch +/
writeln("sql statement executed");
diff --git a/org/output_xmls.org b/org/output_xmls.org
index 1333969..62c838f 100644
--- a/org/output_xmls.org
+++ b/org/output_xmls.org
@@ -324,9 +324,9 @@ auto html_head(Dm)(
</a>
</div>
%s%s¶",
- doc_matters.dochead_meta["title"]["full"],
- (doc_matters.dochead_meta["creator"]["author"].empty) ? ""
- : ", " ~ doc_matters.dochead_meta["creator"]["author"],
+ doc_matters.conf_make_meta.meta.title_full,
+ (doc_matters.conf_make_meta.meta.creator_author.empty) ? ""
+ : ", " ~ doc_matters.conf_make_meta.meta.creator_author,
header_metadata(doc_matters),
((type == "seg") ? "../../../" : "../../") ~ "image/rb7.ico",
((type == "seg")
@@ -393,12 +393,12 @@ auto epub3_seg_head(Dm)(
<body lang="%s">
<a name="top" id="top"></a>¶",
html_simple,
- doc_matters.dochead_meta["title"]["full"],
- (doc_matters.dochead_meta["creator"]["author"].empty) ? ""
- : ", " ~ doc_matters.dochead_meta["creator"]["author"],
- doc_matters.dochead_meta["title"]["full"],
- (doc_matters.dochead_meta["creator"]["author"].empty) ? ""
- : ", " ~ doc_matters.dochead_meta["creator"]["author"],
+ doc_matters.conf_make_meta.meta.title_full,
+ (doc_matters.conf_make_meta.meta.creator_author.empty) ? ""
+ : ", " ~ doc_matters.conf_make_meta.meta.creator_author,
+ doc_matters.conf_make_meta.meta.title_full,
+ (doc_matters.conf_make_meta.meta.creator_author.empty) ? ""
+ : ", " ~ doc_matters.conf_make_meta.meta.creator_author,
doc_matters.language,
);
return o;
@@ -1900,19 +1900,19 @@ string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) {
<item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" />
¶",
uuid,
- xhtml_format.special_characters_text(doc_matters.dochead_meta["title"]["full"]),
- xhtml_format.special_characters_text(doc_matters.dochead_meta["title"]["main"]),
- (doc_matters.dochead_meta["title"]["sub"].empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.dochead_meta["title"]["sub"]),
- (doc_matters.dochead_meta["creator"]["author"].empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.dochead_meta["creator"]["author"]),
- (doc_matters.dochead_meta["creator"]["author"].empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.dochead_meta["creator"]["author"]),
- doc_matters.language,
- (doc_matters.dochead_meta["date"]["published"].empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.dochead_meta["date"]["published"]),
- (doc_matters.dochead_meta["rights"]["copyright"].empty)
- ? "" : xhtml_format.special_characters_text(doc_matters.dochead_meta["rights"]["copyright"]),
+ xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_full),
+ xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_main),
+ (doc_matters.conf_make_meta.meta.title_sub.empty)
+ ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_sub),
+ (doc_matters.conf_make_meta.meta.creator_author.empty)
+ ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author),
+ (doc_matters.conf_make_meta.meta.creator_author.empty)
+ ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author),
+ doc_matters.language, // language, fix (needed in dochead metadata)
+ (doc_matters.conf_make_meta.meta.date_published.empty)
+ ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.date_published),
+ (doc_matters.conf_make_meta.meta.rights_copyright.empty)
+ ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright),
uuid,
uuid,
uuid,
@@ -1988,7 +1988,7 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) {
<h1>Contents</h1>
</header>
<nav epub:type=\"toc\" id=\"toc\">\n",
- doc_matters.dochead_meta["title"]["full"],
+ doc_matters.conf_make_meta.meta.title_full,
);
foreach (sect; doc_matters.keys_seq.seg) {
foreach (obj; doc_abstraction[sect]) {
@@ -2087,14 +2087,14 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) {
<text>%s</text>
</docAuthor>
<navMap>¶",
- doc_matters.dochead_meta["title"]["full"], // title
- (doc_matters.dochead_meta["creator"]["author"].empty) ? ""
- : " by " ~ doc_matters.dochead_meta["creator"]["author"], // author
+ doc_matters.conf_make_meta.meta.title_full, // title
+ (doc_matters.conf_make_meta.meta.creator_author.empty) ? ""
+ : " by " ~ doc_matters.conf_make_meta.meta.creator_author, // author
uuid, // uuid
"3", // content depth
- doc_matters.dochead_meta["title"]["full"], // title
- (doc_matters.dochead_meta["creator"]["author"].empty) ? ""
- : doc_matters.dochead_meta["creator"]["author"], // author
+ doc_matters.conf_make_meta.meta.title_full, // title
+ (doc_matters.conf_make_meta.meta.creator_author.empty) ? ""
+ : doc_matters.conf_make_meta.meta.creator_author, // author
);
foreach (sect; doc_matters.keys_seq.seg) {
foreach (obj; doc_abstraction[sect]) {
diff --git a/org/sdp.org b/org/sdp.org
index 5855ee2..7c7a195 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -16,7 +16,6 @@
[[../maker.org][maker.org makefile]] [[./][org/]]
* 0. version.txt (set version) :version:
-
** set program version
#+NAME: version_txt
@@ -27,7 +26,7 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 18, 1);
+enum ver = Version(0, 19, 0);
#+END_SRC
#+NAME: version_txt
@@ -80,7 +79,6 @@ void main(string[] args) {
<<sdp_mixin>>
<<sdp_args>>
<<sdp_env>>
- <<sdp_conf_files>>
<<sdp_do_selected>>
if (fns_src.length > 0) {
foreach(fn_src; fns_src) {
@@ -112,7 +110,6 @@ unittest {
#+NAME: imports_sdp
#+BEGIN_SRC d
-/+ sdp: sisu document parser, see http://sisudoc.org +/
import sdp.meta;
import
std.getopt,
@@ -120,10 +117,10 @@ import
import
sdp.meta.metadoc_summary,
sdp.meta.metadoc_from_src,
- sdp.meta.composite_make,
sdp.meta.conf_make_meta,
// sdp.meta.conf_make_meta_native,
sdp.meta.conf_make_meta_sdlang,
+ sdp.meta.conf_make_meta_composite,
sdp.meta.defaults,
sdp.meta.doc_debugs,
sdp.meta.read_config_files,
@@ -339,8 +336,7 @@ auto env = [
#+BEGIN_SRC d
auto sdl_root_config_share = configRead!()("config_share", env);
auto sdl_root_config_local = configRead!()("config_local", env);
-auto conf_composite_static_aa = extractSDL().sdlangToAA(conf_aa_empty, sdl_root_config_share);
-conf_composite_static_aa = extractSDL().sdlangToAA(conf_composite_static_aa, sdl_root_config_local);
+auto conf_files_composite_make = confFilesSDLtoStruct!()(sdl_root_config_share, sdl_root_config_local);
#+END_SRC
** 2a. actions independed of processing files
@@ -388,8 +384,7 @@ enforce(
#+NAME: sdp_abstraction
#+BEGIN_SRC d
-auto t =
- SiSUabstraction!()(fn_src, opts, env);
+auto t = SiSUabstraction!()(fn_src, opts, env);
static assert(!isTypeTuple!(t));
static assert(t.length==2);
auto doc_abstraction = t[dAM.abstraction];
@@ -465,7 +460,11 @@ template SiSUabstraction() {
enum makeMeta { make, meta }
enum docAbst { doc_abstraction, section_keys, segnames, segnames_0_4, images }
static auto rgx = Rgx();
- auto SiSUabstraction(Fn,O,E)(Fn fn_src, O opts, E env){
+ auto SiSUabstraction(Fn,O,E)(
+ Fn fn_src,
+ O opts,
+ E env,
+ ){
<<sdp_conf_files>>
<<sdp_each_file_do_read_and_split_sisu_markup_file_content_into_header_and_body>>
<<sdp_each_file_do_split_sisu_markup_file_header_into_make_and_meta>>
@@ -522,36 +521,11 @@ debug(header_and_body) {
#+NAME: sdp_each_file_do_split_sisu_markup_file_header_into_make_and_meta
#+BEGIN_SRC d
/+ ↓ split header into make and meta +/
-auto _make_and_meta_tup =
- docHeaderMakeAndMetaTupExtractAndConvertToAA!()(conf_composite_static_aa, _header_body_inserts[headBody.header]);
-static assert(!isTypeTuple!(_make_and_meta_tup));
-static assert(_make_and_meta_tup.length==2);
-#+END_SRC
-
-** 3. composite make & settings?
-
-#+NAME: sdp_each_file_do_document_abstraction
-#+BEGIN_SRC d
-auto _make_config = compositeMkCnf!()(
- conf_composite_static_aa,
- _make_and_meta_tup[makeMeta.make],
- // opts,
-);
+auto _make_and_meta_struct =
+ docHeaderMakeAndMetaTupExtractAndConvertToStruct!()(conf_files_composite_make, _header_body_inserts[headBody.header]); // breakage ...
#+END_SRC
-** ?. composite config & make (files & doc header) aa
-
-#+NAME: sdp_each_file_do_document_abstraction
-#+BEGIN_SRC d
-auto _make_and_conf_composite_static_plus_docheader_aa = compositeMkCnfAA!()(
- conf_aa_empty,
- conf_composite_static_aa,
- _make_and_meta_tup[makeMeta.make],
- opts,
-);
-#+END_SRC
-
-** 4. _document abstraction, tuple_ (pre-output-processing) :processing:
+** 3. _document abstraction, tuple_ (pre-output-processing) :processing:
- [[./meta_abstraction.org][meta_abstraction]]
- prepare the document abstraction used in downstream processing
@@ -570,8 +544,7 @@ auto _make_and_conf_composite_static_plus_docheader_aa = compositeMkCnfAA!()(
/+ ↓ document abstraction: process document, return abstraction as tuple +/
auto da = SiSUdocAbstraction!()(
_header_body_inserts[headBody.body_content],
- _make_and_meta_tup[makeMeta.make],
- _make_and_meta_tup[makeMeta.meta],
+ _make_and_meta_struct,
opts
);
static assert(!isTypeTuple!(da));
@@ -583,7 +556,7 @@ string[] _doc_epub_segnames_0_4 = da[docAbst.segnames_0_4];
auto _images = da[docAbst.images];
#+END_SRC
-** 5. _document matters_ (doc info gathered, various sources)
+** 4. _document matters_ (doc info gathered, various sources)
- prepare document_matters, miscellany about processing and the document of use
in downstream processing
@@ -604,12 +577,8 @@ struct DocumentMatters {
string[] _k = _doc_epub_segnames_0_4;
return _k;
}
- auto dochead_meta() {
- string[string][string] _k = _make_and_meta_tup[makeMeta.meta];
- return _k;
- }
- auto dochead_make() {
- string[string][string] _k = _make_and_meta_tup[makeMeta.make];
+ auto conf_make_meta() {
+ auto _k = _make_and_meta_struct;
return _k;
}
auto source_filename() {
@@ -733,16 +702,16 @@ foreach (k; doc_matters.keys_seq.seg) {
#+name: meta_metadoc_summary
#+BEGIN_SRC d
auto min_repeat_number = 66;
-auto char_repeat_number = (doc_matters.dochead_meta["title"]["full"].length
- + doc_matters.dochead_meta["creator"]["author"].length + 4);
+auto char_repeat_number = (doc_matters.conf_make_meta.meta.title_full.length
+ + doc_matters.conf_make_meta.meta.creator_author.length + 4);
char_repeat_number = (char_repeat_number > min_repeat_number)
? char_repeat_number
: min_repeat_number;
writefln(
"%s\n\"%s\", %s\n%s\n%s\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n%30-s%10-d\n(%s: %s)\n%s",
markup.repeat_character_by_number_provided("-", char_repeat_number),
- doc_matters.dochead_meta["title"]["full"],
- doc_matters.dochead_meta["creator"]["author"],
+ doc_matters.conf_make_meta.meta.title_full,
+ doc_matters.conf_make_meta.meta.creator_author,
doc_matters.source_filename,
markup.repeat_character_by_number_provided("-", char_repeat_number),
"length toc arr:",
@@ -1028,17 +997,17 @@ provide the result as a single set of make instructions for each document parsed
| | | - dir | | |
| | | - concord_max | | |
|---------------------+-----------------------+-------------------------+------------------------+-----------------------------|
-| | | flag | | |
-| | | - act0 | | |
-| | | - act1 | | |
-| | | - act2 | | |
-| | | - act3 | | |
-| | | - act4 | | |
-| | | - act5 | | |
-| | | - act6 | | |
-| | | - act7 | | |
-| | | - act8 | | |
-| | | - act9 | | |
+| | | flag (configure) | | (call) |
+| | | - act0 | | act0 |
+| | | - act1 | | act1 |
+| | | - act2 | | act2 |
+| | | - act3 | | act3 |
+| | | - act4 | | act4 |
+| | | - act5 | | act5 |
+| | | - act6 | | act6 |
+| | | - act7 | | act7 |
+| | | - act8 | | act8 |
+| | | - act9 | | act9 |
|---------------------+-----------------------+-------------------------+------------------------+-----------------------------|
| | | default | | |
| | | - papersize | | |