From 2731b33fe2d05fe3ebc3e2f98d39eacf7295d1e4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 16 Nov 2019 12:16:08 -0500 Subject: module & src renaming --- src/doc_reform/meta/metadoc.d | 8 +- src/doc_reform/meta/metadoc_from_src.d | 2 +- src/doc_reform/meta/metadoc_harvest.d | 2 +- src/doc_reform/meta/metadoc_harvests_authors.d | 2 +- src/doc_reform/meta/metadoc_harvests_topics.d | 2 +- src/doc_reform/meta/metadoc_object_setter.d | 141 +++++++++++++++++++++++++ src/doc_reform/meta/object_setter.d | 141 ------------------------- 7 files changed, 149 insertions(+), 149 deletions(-) create mode 100644 src/doc_reform/meta/metadoc_object_setter.d delete mode 100644 src/doc_reform/meta/object_setter.d (limited to 'src/doc_reform/meta') diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d index 0d6e7a5..1620281 100644 --- a/src/doc_reform/meta/metadoc.d +++ b/src/doc_reform/meta/metadoc.d @@ -17,10 +17,10 @@ template spineAbstraction() { doc_reform.meta.defaults, doc_reform.meta.doc_debugs, doc_reform.meta.rgx, - doc_reform.source.paths_source, - doc_reform.source.read_config_files, - doc_reform.source.read_source_files, - doc_reform.output.hub; + doc_reform.io_in.paths_source, + doc_reform.io_in.read_config_files, + doc_reform.io_in.read_source_files, + doc_reform.io_out.hub; mixin spineRgxInit; mixin contentJSONtoSpineStruct; mixin spineBiblio; diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index 511f761..ab87eb2 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -15,7 +15,7 @@ template docAbstraction() { std.path; import doc_reform.meta.defaults, - doc_reform.meta.object_setter, + doc_reform.meta.metadoc_object_setter, doc_reform.meta.rgx; /+ ↓ abstraction mixins +/ mixin ObjectSetter; diff --git a/src/doc_reform/meta/metadoc_harvest.d b/src/doc_reform/meta/metadoc_harvest.d index 37c375a..ca9801f 100644 --- a/src/doc_reform/meta/metadoc_harvest.d +++ b/src/doc_reform/meta/metadoc_harvest.d @@ -20,7 +20,7 @@ template spineMetaDocHarvest() { std.conv : to; mixin InternalMarkup; auto markup = InlineMarkup(); - import doc_reform.output.paths_output; + import doc_reform.io_out.paths_output; auto pth_html_abs = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); auto pth_html_rel = spineDocRootTreeHTML!()(doc_matters.src.language); hvst.harvest.title = doc_matters.conf_make_meta.meta.title_full; diff --git a/src/doc_reform/meta/metadoc_harvests_authors.d b/src/doc_reform/meta/metadoc_harvests_authors.d index 21e8f28..f733a80 100644 --- a/src/doc_reform/meta/metadoc_harvests_authors.d +++ b/src/doc_reform/meta/metadoc_harvests_authors.d @@ -347,7 +347,7 @@ string theme_light_1 = format(q"┃ ┃") ~ "\n"; - import doc_reform.output.paths_output; + import doc_reform.io_out.paths_output; auto out_pth = spinePathsHTML!()(_make_and_meta_struct.conf.output_path, ""); try { auto f = File(out_pth.harvest("authors.html"), "w"); diff --git a/src/doc_reform/meta/metadoc_harvests_topics.d b/src/doc_reform/meta/metadoc_harvests_topics.d index ea43d5a..7c7efc3 100644 --- a/src/doc_reform/meta/metadoc_harvests_topics.d +++ b/src/doc_reform/meta/metadoc_harvests_topics.d @@ -506,7 +506,7 @@ string theme_light_1 = format(q"┃ ┃") ~ "\n"; - import doc_reform.output.paths_output; + import doc_reform.io_out.paths_output; auto out_pth = spinePathsHTML!()(_make_and_meta_struct.conf.output_path, ""); try { auto f = File(out_pth.harvest("topics.html"), "w"); diff --git a/src/doc_reform/meta/metadoc_object_setter.d b/src/doc_reform/meta/metadoc_object_setter.d new file mode 100644 index 0000000..908d168 --- /dev/null +++ b/src/doc_reform/meta/metadoc_object_setter.d @@ -0,0 +1,141 @@ +/++ + object setter: + setting of sisu objects for downstream processing + metadoc_object_setter.d ++/ +module doc_reform.meta.metadoc_object_setter; +template ObjectSetter() { + /+ structs +/ + struct DocObj_MetaInfo_ { + string is_of_part = ""; // frontmatter, body, backmatter + string is_of_section = ""; // toc, body, glossary, biography, book index, blurb + string is_of_type = ""; // para, block ? + string is_a = ""; // heading, para, table, code block, group, verse/poem ... + alias of_part = is_of_part; + alias of_section = is_of_section; + alias is_of = is_of_type; + string attrib = ""; + string lang = ""; // blocks: group, block, quote; not codeblock; + string syntax = ""; // codeblock only + /+ o_n +/ + int o_n_substantive = 0; + int o_n_non_substantive = 0; + int o_n_glossary = 0; + int o_n_bibliography = 0; + int o_n_book_index = 0; + int o_n_blurb = 0; + string object_number_substantive() const @property { + return (o_n_substantive==0) ? "" : o_n_substantive.to!string; + } + string object_number_non_substantive() const @property { + return (o_n_non_substantive==0) ? "" : o_n_non_substantive.to!string; + } + string object_number_glossary() const @property { + return (o_n_glossary==0) ? "" : o_n_glossary.to!string; + } + string object_number_bibliography() const @property { + return (o_n_bibliography==0) ? "" : o_n_bibliography.to!string; + } + string object_number_book_index() const @property { + return (o_n_book_index==0) ? "" : o_n_book_index.to!string; + } + string object_number_blurb() const @property { + return (o_n_blurb==0) ? "" : o_n_blurb.to!string; + } + bool object_number_off = false; + bool visible_object_number = false; + int object_number_type = 0; // { ocn, non, bkidx } + /+ node +/ + string[string][string] node; + int ocn = 0; + string identifier = ""; + string object_number() const @property { + return (ocn==0) ? "" : ocn.to!string; + } + int o_n_type = 0; + int heading_lev_markup = 9; + int heading_lev_collapsed = 9; + string marked_up_level() const @property { + string _out; + switch (heading_lev_markup) { + case 0 : _out = "A"; break; + case 1 : _out = "B"; break; + case 2 : _out = "C"; break; + case 3 : _out = "D"; break; + case 4 : _out = "1"; break; + case 5 : _out = "2"; break; + case 6 : _out = "3"; break; + case 7 : _out = "4"; break; + default : _out = ""; break; // "9"; + } + return _out; + } + bool dummy_heading = false; + int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,]; + int parent_lev_markup = 0; + int parent_ocn = 0; + int last_decendant_ocn = 0; + } + struct DocObj_TxtAttrib_ { + int indent_base = 0; + int indent_hang = 0; + bool bullet = false; + string language = ""; + } + struct DocObj_Has_ { + bool inline_links = false; + bool inline_notes_reg = false; + bool inline_notes_star = false; + bool images = false; + bool image_without_dimensions = false; + } + struct DocObj_Table_ { + int number_of_columns = 0; + double[] column_widths = []; + string[] column_aligns = []; + bool heading = false; + bool walls = false; + } + struct DocObj_CodeBlock_ { + string syntax = ""; + bool linenumbers = false; + } + struct DocObj_Stow_ { + string[] link = []; + } + struct DocObj_Pointer_ { + int doc_object = 0; + int html_segnames = 0; + int heading = 0; + } + struct DocObj_Tags_ { + string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ]; + string anchor_tag_html = ""; + string in_segment_html = ""; + string segment_anchor_tag_epub = ""; + string html_segment_anchor_tag_is = ""; + string epub_segment_anchor_tag_is = ""; + string heading_lev_anchor_tag = ""; + string segname_prev = ""; + string segname_next = ""; + string[] lev4_subtoc = []; + string[] anchor_tags = []; + } + struct ObjGenericComposite { + string text = ""; + DocObj_MetaInfo_ metainfo; + DocObj_TxtAttrib_ attrib; + DocObj_Tags_ tags; + DocObj_Has_ has; + DocObj_Table_ table; + DocObj_CodeBlock_ code_block; + DocObj_Stow_ stow; + DocObj_Pointer_ ptr; + } + struct TheObjects { + ObjGenericComposite[] oca; + } +} diff --git a/src/doc_reform/meta/object_setter.d b/src/doc_reform/meta/object_setter.d deleted file mode 100644 index 0ce74fd..0000000 --- a/src/doc_reform/meta/object_setter.d +++ /dev/null @@ -1,141 +0,0 @@ -/++ - object setter: - setting of sisu objects for downstream processing - meta_object_setter.d -+/ -module doc_reform.meta.object_setter; -template ObjectSetter() { - /+ structs +/ - struct DocObj_MetaInfo_ { - string is_of_part = ""; // frontmatter, body, backmatter - string is_of_section = ""; // toc, body, glossary, biography, book index, blurb - string is_of_type = ""; // para, block ? - string is_a = ""; // heading, para, table, code block, group, verse/poem ... - alias of_part = is_of_part; - alias of_section = is_of_section; - alias is_of = is_of_type; - string attrib = ""; - string lang = ""; // blocks: group, block, quote; not codeblock; - string syntax = ""; // codeblock only - /+ o_n +/ - int o_n_substantive = 0; - int o_n_non_substantive = 0; - int o_n_glossary = 0; - int o_n_bibliography = 0; - int o_n_book_index = 0; - int o_n_blurb = 0; - string object_number_substantive() const @property { - return (o_n_substantive==0) ? "" : o_n_substantive.to!string; - } - string object_number_non_substantive() const @property { - return (o_n_non_substantive==0) ? "" : o_n_non_substantive.to!string; - } - string object_number_glossary() const @property { - return (o_n_glossary==0) ? "" : o_n_glossary.to!string; - } - string object_number_bibliography() const @property { - return (o_n_bibliography==0) ? "" : o_n_bibliography.to!string; - } - string object_number_book_index() const @property { - return (o_n_book_index==0) ? "" : o_n_book_index.to!string; - } - string object_number_blurb() const @property { - return (o_n_blurb==0) ? "" : o_n_blurb.to!string; - } - bool object_number_off = false; - bool visible_object_number = false; - int object_number_type = 0; // { ocn, non, bkidx } - /+ node +/ - string[string][string] node; - int ocn = 0; - string identifier = ""; - string object_number() const @property { - return (ocn==0) ? "" : ocn.to!string; - } - int o_n_type = 0; - int heading_lev_markup = 9; - int heading_lev_collapsed = 9; - string marked_up_level() const @property { - string _out; - switch (heading_lev_markup) { - case 0 : _out = "A"; break; - case 1 : _out = "B"; break; - case 2 : _out = "C"; break; - case 3 : _out = "D"; break; - case 4 : _out = "1"; break; - case 5 : _out = "2"; break; - case 6 : _out = "3"; break; - case 7 : _out = "4"; break; - default : _out = ""; break; // "9"; - } - return _out; - } - bool dummy_heading = false; - int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,]; - int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,]; - int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,]; - int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,]; - int parent_lev_markup = 0; - int parent_ocn = 0; - int last_decendant_ocn = 0; - } - struct DocObj_TxtAttrib_ { - int indent_base = 0; - int indent_hang = 0; - bool bullet = false; - string language = ""; - } - struct DocObj_Has_ { - bool inline_links = false; - bool inline_notes_reg = false; - bool inline_notes_star = false; - bool images = false; - bool image_without_dimensions = false; - } - struct DocObj_Table_ { - int number_of_columns = 0; - double[] column_widths = []; - string[] column_aligns = []; - bool heading = false; - bool walls = false; - } - struct DocObj_CodeBlock_ { - string syntax = ""; - bool linenumbers = false; - } - struct DocObj_Stow_ { - string[] link = []; - } - struct DocObj_Pointer_ { - int doc_object = 0; - int html_segnames = 0; - int heading = 0; - } - struct DocObj_Tags_ { - string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ]; - string anchor_tag_html = ""; - string in_segment_html = ""; - string segment_anchor_tag_epub = ""; - string html_segment_anchor_tag_is = ""; - string epub_segment_anchor_tag_is = ""; - string heading_lev_anchor_tag = ""; - string segname_prev = ""; - string segname_next = ""; - string[] lev4_subtoc = []; - string[] anchor_tags = []; - } - struct ObjGenericComposite { - string text = ""; - DocObj_MetaInfo_ metainfo; - DocObj_TxtAttrib_ attrib; - DocObj_Tags_ tags; - DocObj_Has_ has; - DocObj_Table_ table; - DocObj_CodeBlock_ code_block; - DocObj_Stow_ stow; - DocObj_Pointer_ ptr; - } - struct TheObjects { - ObjGenericComposite[] oca; - } -} -- cgit v1.2.3