diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/default_misc.org | 2 | ||||
-rw-r--r-- | org/in_source_files.org | 64 | ||||
-rw-r--r-- | org/meta_conf_make_meta.org | 2 | ||||
-rw-r--r-- | org/metaverse.org | 80 | ||||
-rw-r--r-- | org/out_harvest_metadata.org | 10 | ||||
-rw-r--r-- | org/out_latex.org | 6 | ||||
-rw-r--r-- | org/out_metadata.org | 6 | ||||
-rw-r--r-- | org/out_odt.org | 2 | ||||
-rw-r--r-- | org/out_sqlite.org | 6 | ||||
-rw-r--r-- | org/out_xmls.org | 20 |
10 files changed, 117 insertions, 81 deletions
diff --git a/org/default_misc.org b/org/default_misc.org index 8988f3e..5351c30 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -292,7 +292,7 @@ template InternalMarkup() { string tc_p = "┆"; string img = "☼"; string sep = "␣"; - string on_o = "「"; auto on_c = "」"; + string on_o = "「"; string on_c = "」"; string mk_bullet = "● "; static string indent_by_spaces_provided(int indent, string _indent_spaces ="░░") { _indent_spaces = replicate(_indent_spaces, indent); diff --git a/org/in_source_files.org b/org/in_source_files.org index cb95fda..7ea9bae 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -267,7 +267,7 @@ static template spineRawMarkupContent() { mixin spineRgxInit; static auto rgx = Rgx(); string[] _images=[]; - auto _extract_images(S)(S content_block) @safe { + string[] _extract_images(S)(S content_block) @safe { string[] images_; string _content_block = content_block.to!string; if (auto m = _content_block.matchAll(rgx.image)) { @@ -276,6 +276,17 @@ static template spineRawMarkupContent() { return images_; } auto rawsrc = RawMarkupContent(); + alias ContentsInsertsImages = Tuple!( + char[][], "contents", + string[], "insert_files", + string[], "images" + ); + alias HeaderContentInsertsImages = Tuple!( + char[], "header", + char[][], "src_txt", + string[], "insert_files", + string[], "images" + ); auto spineRawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) @safe { auto _0_header_1_body_content_2_insert_filelist_tuple = rawsrc.sourceContentSplitIntoHeaderAndBody(_opt_action, rawsrc.sourceContent(fn_src), fn_src); @@ -284,7 +295,7 @@ static template spineRawMarkupContent() { struct RawMarkupContent { final sourceContent(in string fn_src) { auto raw = MarkupRawUnit(); - auto source_txt_str + string source_txt_str = raw.markupSourceReadIn(fn_src); return source_txt_str; } @@ -296,22 +307,22 @@ static template spineRawMarkupContent() { auto raw = MarkupRawUnit(); string[] insert_file_list; string[] images_list; - Tuple!(char[], char[][], string[], string[]) t + HeaderContentInsertsImages t = raw.markupSourceHeaderContentRawLineTupleArray(source_txt_str); - auto header_raw = t[0]; - auto sourcefile_body_content = t[1]; + char[] header_raw = t.header; + char[][] sourcefile_body_content = t.src_txt; if (fn_src.match(rgx.src_fn_master)) { // filename with path needed if master file (.ssm) not otherwise auto ins = Inserts(); - Tuple!(char[][], string[], string[]) tu + ContentsInsertsImages tu = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); - sourcefile_body_content = tu[0]; - insert_file_list = tu[1].dup; - images_list = tu[2].dup; + sourcefile_body_content = tu.contents; + insert_file_list = tu.insert_files.dup; + images_list = tu.images.dup; } else if (_opt_action.source || _opt_action.pod) { auto ins = Inserts(); - Tuple!(char[][], string[], string[]) tu + ContentsInsertsImages tu = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); - images_list = tu[2].dup; + images_list = tu.images.dup; } string header_type = ""; t = tuple( @@ -320,7 +331,6 @@ static template spineRawMarkupContent() { insert_file_list, images_list ); - static assert(t.length==4); return t; } } @@ -334,7 +344,11 @@ static template spineRawMarkupContent() { <<meta_markup_source_raw_get_insert_source_line_array>> } struct Inserts { - auto scan_subdoc_source(O)( + alias ContentsAndImages = Tuple!( + char[][], "insert_contents", + string[], "images" + ); + ContentsAndImages scan_subdoc_source(O)( O _opt_action, char[][] markup_sourcefile_insert_content, string fn_src @@ -346,7 +360,7 @@ static template spineRawMarkupContent() { } // end src subdoc (inserts) loop <<meta_inserts_scan_post>> } - Tuple!(char[][], string[], string[]) scan_master_src_for_insert_files_and_import_content(O)( + ContentsInsertsImages scan_master_src_for_insert_files_and_import_content(O)( O _opt_action, char[][] sourcefile_body_content, string fn_src @@ -434,14 +448,14 @@ final private char[][] markupSourceLineArray(in char[] src_text) @trusted { // c #+name: meta_markup_source_raw_read_in_file #+BEGIN_SRC d -auto markupSourceReadIn(in string fn_src) { +string markupSourceReadIn(in string fn_src) { static auto rgx = Rgx(); enforce( fn_src.match(rgx.src_pth_sst_or_ssm), "not a dr markup filename: «" ~ fn_src ~ "»" ); - auto source_txt_str = readInMarkupSource(fn_src); + string source_txt_str = readInMarkupSource(fn_src); return source_txt_str; } #+END_SRC @@ -455,14 +469,14 @@ auto markupSourceReadIn(in string fn_src) { #+name: meta_markup_source_raw_tuple_of_header_and_body #+BEGIN_SRC d -Tuple!(char[], char[][], string[], string[]) markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe { +HeaderContentInsertsImages markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe { string[] file_insert_list = []; string[] images_list = []; char[][] hc = header0Content1(source_txt_str); char[] header = hc[0]; char[] source_txt = hc[1]; char[][] source_line_arr = markupSourceLineArray(source_txt); - Tuple!(char[], char[][], string[], string[]) t = tuple( + HeaderContentInsertsImages t = tuple( header, source_line_arr, file_insert_list, @@ -570,7 +584,7 @@ if (type1["curly_code"] == 1) { type1["header_meta"] = 0; contents_insert ~= line; // images to extract for image list? if (_opt_action.source || _opt_action.pod) { - auto _image_linelist = _extract_images(line); + string[] _image_linelist = _extract_images(line); if (_image_linelist.length > 0) { _images ~= _image_linelist; } @@ -582,7 +596,7 @@ if (type1["curly_code"] == 1) { #+name: meta_inserts_scan_post #+BEGIN_SRC d -Tuple!(char[][], string[]) t = tuple( +ContentsAndImages t = tuple( contents_insert, _images ); @@ -642,14 +656,14 @@ if (type["curly_code"] == 1) { ); } auto ins = Inserts(); - auto contents_insert_tu = ins.scan_subdoc_source( + ContentsAndImages contents_insert_tu = ins.scan_subdoc_source( _opt_action, markup_sourcefile_insert_content, fn_src_insert.to!string ); - contents ~= contents_insert_tu[0]; // images to extract for image list? + contents ~= contents_insert_tu.insert_contents; if (_opt_action.source || _opt_action.pod) { - auto _image_linelist = _extract_images(contents_insert_tu[0]); + string[] _image_linelist = _extract_images(contents_insert_tu.images); if (_image_linelist.length > 0) { _images ~= _image_linelist; } @@ -667,7 +681,7 @@ if (type["curly_code"] == 1) { } else { contents ~= line; if (_opt_action.source || _opt_action.pod) { - auto _image_linelist = _extract_images(line); + string[] _image_linelist = _extract_images(line); if (_image_linelist.length > 0) { _images ~= _image_linelist; } @@ -687,7 +701,7 @@ debug(insert_file) { writeln(__LINE__); writeln(contents.length); } -Tuple!(char[][], string[], string[]) t = tuple( +ContentsInsertsImages t = tuple( contents, insert_file_list, images diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index 746f712..0362a83 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -69,7 +69,7 @@ import mixin spineRgxInit; static auto rgx = Rgx(); mixin InternalMarkup; -auto mkup = InlineMarkup(); +static auto mkup = InlineMarkup(); #+END_SRC ** struct Generic ConfComposite diff --git a/org/metaverse.org b/org/metaverse.org index cc8414b..be6c662 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -238,6 +238,28 @@ int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,] int[] dom_structure_markedup_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; int[] dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; +alias TxtPlusHasFootnotes = Tuple!( + string, "obj_txt", + bool, "has_notes_reg", + bool, "has_notes_star", + bool, "has_notes_plus", +); +alias TxtPlusHasFootnotesUrlsImages = Tuple!( + string, "obj_txt", + bool, "has_notes_reg", + bool, "has_notes_star", + bool, "has_notes_plus", + bool, "has_urls", + bool, "has_images_without_dimensions", +); +alias TxtAndAnchorTagPlusHasFootnotesUrlsImages = Tuple!( + string, "obj_txt", + string, "anchor_tag", + bool, "has_notes_reg", + bool, "has_notes_star", + bool, "has_links", + bool, "has_images_without_dimensions", +); enum DomTags { none, open, close, close_and_open, open_still, } #+END_SRC @@ -1295,7 +1317,7 @@ if ((obj_type_status["heading"] == State.on) : ocn_emit(obj_type_status["ocn_status"]); an_object["is"] = "heading"; an_object_key="body_nugget"; - auto substantive_object_and_anchor_tags_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_object_and_anchor_tags_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, ((_new_doc) ? Yes._new_doc : No._new_doc)); an_object["substantive"] = substantive_object_and_anchor_tags_tuple[sObj.content]; anchor_tag = substantive_object_and_anchor_tags_tuple[sObj.anchor_tag]; @@ -1440,7 +1462,7 @@ if ((obj_type_status["heading"] == State.on) heading_ptr-1, an_object["is"], ); - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -3943,7 +3965,7 @@ string[string] flow_txt_block_poem(CMM)( ); } an_object["is"] = "verse"; - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -4006,7 +4028,7 @@ string[string] flow_txt_block_poem(CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -4052,7 +4074,7 @@ string[string] flow_txt_block_poem(CMM)( } processing.remove("verse"); an_object["is"] = "verse"; - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -4115,7 +4137,7 @@ string[string] flow_txt_block_poem(CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -4261,7 +4283,7 @@ void flow_table_closed_make_special_notation_table_(N,CMM)( "table" ); an_object["is"] = "table"; - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; comp_obj_block.metainfo.ocn = obj_cite_digits.object_number; @@ -4339,7 +4361,7 @@ string[string] flow_block_flag_line_empty_(B,N,CMM,Ts)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -4396,7 +4418,7 @@ string[string] flow_block_flag_line_empty_(B,N,CMM,Ts)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -4453,7 +4475,7 @@ string[string] flow_block_flag_line_empty_(B,N,CMM,Ts)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; // anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -4552,7 +4574,7 @@ string[string] flow_block_flag_line_empty_(B,N,CMM,Ts)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; @@ -4610,7 +4632,7 @@ string[string] flow_block_flag_line_empty_(B,N,CMM,Ts)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple + TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; comp_obj_block = comp_obj_block.init; @@ -5422,7 +5444,7 @@ static struct ObjInlineMarkupMunge { #+name: meta_emitters_obj_inline_markup_munge #+BEGIN_SRC d - Tuple!(string, bool, bool, bool) footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) @safe { + TxtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) @safe { /+ endnotes (regular) +/ bool flg_notes_reg = false; bool flg_notes_star = false; @@ -5478,7 +5500,7 @@ static struct ObjInlineMarkupMunge { } else { obj_txt_out = obj_txt_in; } - Tuple!(string, bool, bool, bool) t = tuple( + TxtPlusHasFootnotes t = tuple( obj_txt_out, flg_notes_reg, flg_notes_star, @@ -5492,7 +5514,7 @@ static struct ObjInlineMarkupMunge { #+name: meta_emitters_obj_inline_markup_munge #+BEGIN_SRC d - private Tuple!(string, bool, bool, bool, bool, bool) object_notes_and_links_()( + private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()( string obj_txt_in, bool reset_note_numbers=false ) @safe { @@ -5526,8 +5548,8 @@ static struct ObjInlineMarkupMunge { obj_txt_in = obj_txt_in .replaceAll(rgx.para_inline_link_anchor, "┃$1┃"); } - Tuple!(string, bool, bool, bool) ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers); - obj_txt_out = ftn[0]; + TxtPlusHasFootnotes ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers); + obj_txt_out = ftn.obj_txt; debug(footnotes) { writeln(obj_txt_out, tail); } @@ -5539,18 +5561,18 @@ static struct ObjInlineMarkupMunge { writeln(m.hit); } } - Tuple!(string, bool, bool, bool, bool, bool) t = tuple( + TxtPlusHasFootnotesUrlsImages t = tuple( obj_txt_out, - ftn[1], - ftn[2], - ftn[3], + ftn.has_notes_reg, + ftn.has_notes_star, + ftn.has_notes_plus, urls, images_without_dimensions, ); return t; } auto init() { - Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(""); + TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(""); return t; } invariant() { @@ -5571,7 +5593,7 @@ static struct ObjInlineMarkupMunge { .replaceFirst(rgx.heading, "") .replaceFirst(rgx.object_number_off_all, "") .strip; - Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers); + TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers); debug(munge) { writeln(__LINE__); writeln(obj_txt_in); @@ -5598,7 +5620,7 @@ static struct ObjInlineMarkupMunge { obj_txt["munge"]=(obj_txt_in) .replaceFirst(rgx.para_attribs, "") .replaceFirst(rgx.object_number_off_all, ""); - Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"]); + TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]); debug(munge) { writeln(__LINE__); writeln(obj_txt_in); @@ -5634,7 +5656,7 @@ static struct ObjInlineMarkupMunge { #+BEGIN_SRC d auto munge_group(string obj_txt_in) @safe { obj_txt["munge"]=obj_txt_in; - Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"]); + TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]); return t; } invariant() { @@ -5654,7 +5676,7 @@ static struct ObjInlineMarkupMunge { #+BEGIN_SRC d auto munge_block()(string obj_txt_in) @safe { obj_txt["munge"]=obj_txt_in; - Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"]); + TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]); return t; } invariant() { @@ -5674,7 +5696,7 @@ static struct ObjInlineMarkupMunge { #+BEGIN_SRC d auto munge_verse()(string obj_txt_in) @safe { obj_txt["munge"]=obj_txt_in; - Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"]); + TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]); return t; } invariant() { @@ -5749,7 +5771,7 @@ 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(CMM)( + TxtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)( string[string] obj_, string obj_key_, CMM conf_make_meta, @@ -5829,7 +5851,7 @@ static struct ObjInlineMarkup { obj_notes_and_links["image_no_dimensions"] = x[5]; break; } - Tuple!(string, string, bool, bool, bool, bool) t = tuple( + TxtAndAnchorTagPlusHasFootnotesUrlsImages t = tuple( obj_txt["munge"], anchor_tag, obj_notes_and_links["notes_reg"], diff --git a/org/out_harvest_metadata.org b/org/out_harvest_metadata.org index 7a27ebf..4b7fe7e 100644 --- a/org/out_harvest_metadata.org +++ b/org/out_harvest_metadata.org @@ -58,7 +58,7 @@ import #+name: metadoc_harvest_initialize #+BEGIN_SRC d -auto markup = InlineMarkup(); +static auto mkup = InlineMarkup(); #+END_SRC ** harvest summary @@ -73,12 +73,12 @@ char_repeat_number = (char_repeat_number > min_repeat_number) : min_repeat_number; writefln( "%s\n\"%s\", %s\n%s\n%s\n%s", - markup.repeat_character_by_number_provided("-", char_repeat_number), + mkup.repeat_character_by_number_provided("-", char_repeat_number), doc_matters.conf_make_meta.meta.title_full, doc_matters.conf_make_meta.meta.creator_author, doc_matters.src.filename, doc_matters.conf_make_meta.meta.classify_topic_register_arr, - markup.repeat_character_by_number_provided("-", char_repeat_number), + mkup.repeat_character_by_number_provided("-", char_repeat_number), ); #+END_SRC @@ -127,7 +127,7 @@ module doc_reform.meta.metadoc_harvests_topics; mixin InternalMarkup; mixin spineRgxInit; template spineMetaDocHarvestsTopics() { - auto mkup = InlineMarkup(); + static auto mkup = InlineMarkup(); void spineMetaDocHarvestsTopics(H,M,O)( H hvst, M _make_and_meta_struct, @@ -459,7 +459,7 @@ module doc_reform.meta.metadoc_harvests_authors; mixin InternalMarkup; mixin spineRgxInit; template spineMetaDocHarvestsAuthors() { - auto mkup = InlineMarkup(); + static auto mkup = InlineMarkup(); void spineMetaDocHarvestsAuthors(H,M,O)( H harvests, M _make_and_meta_struct, diff --git a/org/out_latex.org b/org/out_latex.org index 8ae369b..8a84ceb 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -25,7 +25,7 @@ template outputLaTeX() { <<output_latex_imports>> mixin InternalMarkup; // watch mixin spineOutputRgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); mixin spineLanguageCodes; auto lang = Lang(); <<output_latex_shared>> @@ -75,8 +75,8 @@ void writeOutputLaTeX(T,M)( f.writeln(latex_content.content); f.writeln(latex_content.tail); foreach (image; doc_matters.srcs.image_list) { - auto fn_src_in = doc_matters.src.image_dir_path ~ "/" ~ image; - auto fn_src_out_file = pth_latex.latex_path_stuff ~ "/" ~ image; + string fn_src_in = doc_matters.src.image_dir_path ~ "/" ~ image; + string fn_src_out_file = pth_latex.latex_path_stuff ~ "/" ~ image; if (exists(fn_src_in)) { fn_src_in.copy(fn_src_out_file); } diff --git a/org/out_metadata.org b/org/out_metadata.org index f3c069c..e8da2c4 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -19,8 +19,8 @@ ** _module template_ metadoc document metadata -#+BEGIN_SRC d :tangle "../src/spine/io_out/metadata.d" -module spine.io_out.metadata; +#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/metadata.d" +module doc_reform.io_out.metadata; template outputMetadata() { void outputMetadata(T)( T doc_matters) @safe { <<output_imports>> @@ -41,7 +41,7 @@ template outputMetadata() { #+BEGIN_SRC d import std.file; import std.format; -import spine.io_out; +import doc_reform.io_out; mixin InternalMarkup; string[] metadata_; #+END_SRC diff --git a/org/out_odt.org b/org/out_odt.org index 66fe2b4..e843a48 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -58,7 +58,7 @@ template outputODT() { <<output_imports>> mixin InternalMarkup; mixin spineOutputRgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); // mixin outputXmlODT; <<output_odt_variable_content_xml>> <<output_odt_variable_manifest_xml>> diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 9f247b1..5e56ad1 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -132,7 +132,7 @@ template SQLiteDbRun() { #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/sqlite.d" template SQLinsertDelimiter() { - auto SQLinsertDelimiter(string _txt) { + string SQLinsertDelimiter(string _txt) { _txt = _txt .replaceAll(rgx.quotation_mark_sql_insert_delimiter, "$0$0"); return _txt; @@ -673,7 +673,7 @@ string inline_notes_scroll(M,O)( #+name: sanitize_and_munge_inline_html #+BEGIN_SRC d -Tuple!(string, string) inline_notes_seg(M,O)( +Tuple!(string, string[]) inline_notes_seg(M,O)( M doc_matters, const O obj, string _txt, @@ -706,7 +706,7 @@ Tuple!(string, string) inline_notes_seg(M,O)( writeln(__LINE__, " endnote: ", obj.metainfo.is_a, ": ", obj.text); } } - Tuple!(string, string) t = tuple( + Tuple!(string, string[]) t = tuple( _txt, _endnotes, ); diff --git a/org/out_xmls.org b/org/out_xmls.org index df095ec..9738c23 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -589,9 +589,9 @@ string inline_notes_scroll(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d Tuple!(string, string[]) inline_notes_seg(O,M)( - string _txt, - const O obj, - M doc_matters, + string _txt, + const O obj, + M doc_matters, ) @safe { string[] _endnotes; if (obj.has.inline_notes_star) { @@ -698,7 +698,7 @@ auto inline_markup_seg(O,M)( _txt = inline_images(_txt, obj, doc_matters, _suffix, _xml_type); // TODO _txt = inline_links(_txt, obj, doc_matters, _suffix, _xml_type); // TODO } - auto t = inline_notes_seg(_txt, obj, doc_matters); + Tuple!(string, string[]) t = inline_notes_seg(_txt, obj, doc_matters); return t; } #+END_SRC @@ -1529,7 +1529,7 @@ void scroll(D,M)( ) @safe { mixin spineOutputRgxInit; auto xhtml_format = outputXHTMLs(); - auto rgx = Rgx(); + static auto rgx = Rgx(); string[] doc_html; string[] doc; string suffix = ".html"; @@ -1764,7 +1764,7 @@ void seg(D,M)( M doc_matters, ) @safe { mixin spineOutputRgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto xhtml_format = outputXHTMLs(); string[][string] doc_html; string[][string] doc_html_endnotes; @@ -2069,7 +2069,7 @@ void seg_write_output(D,E,M)( static assert(is(typeof(doc_html) == string[][string])); } mixin spineOutputRgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); auto xhtml_format = outputXHTMLs(); auto m = doc_matters.src.filename.matchFirst(rgx.src_fn); @@ -2334,7 +2334,7 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) @sa string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) @safe { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); - auto rgx = Rgx(); + static auto rgx = Rgx(); string toc =format("<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:epub=\"http://www.idpf.org/2007/ops\"> <head> @@ -2423,7 +2423,7 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) @safe { int counter = 0; string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO shared elsewhere auto markup = InlineMarkup(); - auto rgx = Rgx(); + static auto rgx = Rgx(); enum DomTags { none, open, close, close_and_open, open_still, } string toc = format(q"┃<?xml version='1.0' encoding='utf-8'?> <ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1"> @@ -2521,7 +2521,7 @@ void outputEPub3(D,I)( ) { // @trusted mixin spineOutputRgxInit; auto xhtml_format = outputXHTMLs(); - auto rgx = Rgx(); + static auto rgx = Rgx(); string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; |