From bdcb9189e4cf221bec1efaf2e6e612b127e51f25 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 6 Jan 2018 20:34:42 -0500 Subject: 0.23.3 work on source & target file paths/locations --- org/default_misc.org | 44 ++-- org/default_paths.org | 498 +++++++++++++++++++++++------------------ org/default_regex.org | 1 + org/meta_abstraction.org | 410 ++++++++++++++++----------------- org/meta_conf_make_meta.org | 12 +- org/meta_debugs.org | 42 ++-- org/meta_read_source_files.org | 72 +++--- org/output_hub.org | 125 +++++++---- org/output_sisupod.org | 160 ++++++++----- org/output_sqlite.org | 46 ++-- org/output_sqlite_discrete.org | 42 ++-- org/output_xmls.org | 177 +++++++-------- org/sdp.org | 226 ++++++++++++------- 13 files changed, 1036 insertions(+), 819 deletions(-) (limited to 'org') diff --git a/org/default_misc.org b/org/default_misc.org index b6845b7..bbf1477 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -232,8 +232,8 @@ string extractSDLangTabOrAttrib(S)(S conf_sdlang, string maintab, string atab) { #+name: meta_defaults_template_registers #+BEGIN_SRC d -static auto ptr_head_main = - [ +static auto ptr_head_main + = [ "classify", "creator", "date", @@ -245,24 +245,24 @@ static auto ptr_head_main = "rights", "title" ]; -static auto ptr_head_sub_classify = - [ +static auto ptr_head_sub_classify + = [ "dewey", "keywords", "loc", "subject", "topic_register" ]; -static auto ptr_head_sub_creator = - [ +static auto ptr_head_sub_creator + = [ "author", "author_email", "cover", "illustrator", "translator" ]; -static auto ptr_head_sub_date = - [ +static auto ptr_head_sub_date + = [ "added_to_site", "available", "created", @@ -271,15 +271,15 @@ static auto ptr_head_sub_date = "published", "valid" ]; -static auto ptr_head_sub_identifier = - [ +static auto ptr_head_sub_identifier + = [ "isbn", "oclc", "pg" ]; /+ make +/ -static auto ptr_head_sub_make = - [ +static auto ptr_head_sub_make + = [ "cover_image", "home_button_image", "home_button_text", @@ -293,28 +293,28 @@ static auto ptr_head_sub_make = "texpdf_font", "css" ]; -static auto ptr_head_sub_notes = - [ +static auto ptr_head_sub_notes + = [ "abstract", "description" ]; -static auto ptr_head_sub_original = - [ +static auto ptr_head_sub_original + = [ "language", "source", "title" ]; -static auto ptr_head_sub_publisher = - [ "name" ]; -static auto ptr_head_sub_rights = - [ +static auto ptr_head_sub_publisher + = [ "name" ]; +static auto ptr_head_sub_rights + = [ "copyright", "cover", "illustrations", "license" ]; -static auto ptr_head_sub_title = - [ +static auto ptr_head_sub_title + = [ "edition", "full", "language", diff --git a/org/default_paths.org b/org/default_paths.org index dfaf362..369e71b 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -79,10 +79,10 @@ template PodManifest() { #+name: template_paths_src #+BEGIN_SRC d -template PodMatters() { +template PathMatters() { mixin SiSUrgxInit; static auto rgx = Rgx(); - auto PodMatters(O,E,P,F)( + auto PathMatters(O,E,P,F)( O _opt_actions, E _env, P _pth = "", @@ -91,99 +91,206 @@ template PodMatters() { ) { auto _manifest = PodManifest!()(_pth); struct ManifestMatters_ { - auto pwd() { - return _env["pwd"]; - } - auto home() { - return _env["home"]; - } - auto opt_action() { - return _opt_actions; - } - auto is_pod() { - auto _is_pod = (_manifest.pod_manifest_path.length > 0) ? true : false; - return _is_pod; - } - auto pod_manifest_list_of_filenames() { - return _manifest_fn_list; - } - auto pod_manifest_list_of_languages() { - string[] _lngs; - foreach (filename_; pod_manifest_list_of_filenames) { - string _k = "en"; - if (auto m = (filename_).match(rgx.language_code_and_filename)) { - _k = m.captures[1].to!string; + auto env() { + struct Env_ { + auto pwd() { + return _env["pwd"]; + } + auto home() { + return _env["home"]; } - _lngs ~= _k; // all the languages from the manifest list of filenames with paths } - return _lngs; - } - auto pod_manifest_filename() { - return _manifest.pod_manifest_filename; + return Env_(); } - auto pod_manifest_path() { - return _manifest.pod_manifest_path; - } - auto pod_manifest_file_with_path() { - return _manifest.pod_manifest_file_with_path; - } - auto pod_config_dirs() { // TODO - string[] _config_dirs; - return _config_dirs; - } - auto pod_image_dirs() { // TODO - string[] _image_dirs; - return _image_dirs; - } - auto src_path_and_fn() { - return _fns; + auto opt() { + struct Opt_ { + auto action() { // redundant + return _opt_actions; + } + } + return Opt_(); } - auto src_fn() { - auto _fn = (src_path_and_fn).match(rgx.src_pth_sst_or_ssm).captures["filename"]; - return _fn; + auto src_is_pod() { + auto _src_is_pod = (_manifest.pod_manifest_path.length > 0) ? true : false; + return _src_is_pod; } - auto src_lng() { - string _k; - if (auto m = (src_path_and_fn).match(rgx.language_code_and_filename)) { - _k = m.captures[1]; - } else { - _k = "en"; + auto pod() { + struct Pod_ { + auto src_is_pod() { + auto _src_is_pod = (_manifest.pod_manifest_path.length > 0) ? true : false; + return _src_is_pod; + } + auto manifest_filename() { + return _manifest.pod_manifest_filename; + } + auto manifest_path() { + return _manifest.pod_manifest_path; + } + auto manifest_file_with_path() { + return _manifest.pod_manifest_file_with_path; + } + auto config_dirs() { // TODO + string[] _config_dirs; + return _config_dirs; + } + auto image_dirs() { // TODO + string[] _image_dirs; + return _image_dirs; + } + auto manifest_list_of_filenames() { + return _manifest_fn_list; + } + auto manifest_list_of_languages() { + string[] _lngs; + foreach (filename_; manifest_list_of_filenames) { + string _k = "en"; + if (auto m = (filename_).match(rgx.language_code_and_filename)) { + _k = m.captures[1].to!string; + } + _lngs ~= _k; // all the languages from the manifest list of filenames with paths + } + return _lngs; + } } - return _k; + return Pod_(); } - auto output_path() { - auto _output_path = pwd; - if ((_opt_actions.output_dir_set.length > 0) - && isValidPath(_opt_actions.output_dir_set) - ) { - _output_path = asNormalizedPath(_opt_actions.output_dir_set).array; - if (!exists(_output_path)) { - try { - _output_path.mkdirRecurse; + auto src() { + struct SRC_ { + auto is_pod() { + auto _src_is_pod = (_manifest.pod_manifest_path.length > 0) ? true : false; + return _src_is_pod; + } + auto path_and_fn() { + return _fns; + } + auto filename() { + auto _fn = (path_and_fn).baseName; + return _fn; + } + auto lng() { + string _k; + if (auto m = (path_and_fn).match(rgx.language_code_and_filename)) { + _k = m.captures[1]; + } else { + _k = "en"; } - catch (Exception ex) { - // Handle error + return _k; + } + auto file_with_absolute_path() { + string _pth = _env["pwd"].chainPath(path_and_fn).array; + return _pth; + } + auto absolute_path_to_src() { + string _pth = (_env["pwd"].chainPath(path_and_fn)).dirName.array; + return _pth; + } + auto base_dir() { + string _dir; + if ( // TODO this should catch generated --source sisupod, untested, needs manifest + auto m = (absolute_path_to_src) + .match(regex(r"[/](?P(?:[a-zA-Z0-9._-]+))/sisupod/" ~ filename.stripExtension)) + ) { + _dir = asAbsolutePath(path_and_fn.chainPath("../../")).array; + assert(_dir == m.captures["dir"]); + } else { + _dir = asAbsolutePath(path_and_fn.chainPath("../../../")).array; + assert(_dir == absolute_path_to_src.match(rgx.src_base_parent_dir_name).captures["dir"]); } + writeln("--> ", _dir); + return _dir; + } + auto base_parent_dir_path() { + string _dir; + if ( // TODO this should catch generated --source sisupod, untested, needs manifest + auto m = (absolute_path_to_src) + .match(regex(r"[/](?P(?:[a-zA-Z0-9._-]+))/sisupod/" ~ filename.stripExtension)) + ) { + _dir = asAbsolutePath(path_and_fn.chainPath("../../")).array; + } else { + _dir = asAbsolutePath(path_and_fn.chainPath("../../../")).array; + } + return _dir; + } + auto base_dir_path() { // looks like there is work to do + string _dir; + if ( // TODO this should catch generated --source sisupod, untested, needs manifest + auto m = (absolute_path_to_src) + .match(regex(r"[/](?P(?:[a-zA-Z0-9._-]+))/sisupod/" ~ filename.stripExtension)) + ) { + _dir = asAbsolutePath(path_and_fn.chainPath("../")).array; + } else { + _dir = asAbsolutePath(path_and_fn.chainPath("../../")).array; + } + writeln("--> ", _dir); + return _dir; + } + auto media_dir_path() { // TODO rework, can base directly on src fn path + auto _dir = asAbsolutePath(base_dir_path.chainPath("media")).array; + return _dir; + } + auto image_dir_path() { + auto _dir = asAbsolutePath(base_dir_path.chainPath("media/image")).array; + return _dir; + } + auto conf_dir_path() { + auto _dir = asAbsolutePath(base_dir_path.chainPath("conf")).array; + return _dir; + } + auto base_parent_dir() { + string _dir; + if ( // TODO this should catch generated --source sisupod, untested, needs manifest + auto m = (absolute_path_to_src) + .match(regex(r"[/](?P(?:[a-zA-Z0-9._-]+))/sisupod/" ~ filename.stripExtension)) + ) { + _dir = m.captures["dir"]; + } else { + _dir = (absolute_path_to_src).match(rgx.src_base_parent_dir_name).captures["dir"]; + } + writeln("--> ", _dir); + return _dir; + } + auto config_dirs() { // TODO + string[] _config_dirs; + if (is_pod) { + } else { + } + return _config_dirs; + } + auto image_dirs() { // TODO + string[] _image_dirs; + if (is_pod) { + } else { + } + return _image_dirs; } - assert(_output_path.isDir, - "not a directory: " ~ _output_path); - // TODO always test that is a directory and it is writable - } - return _output_path; - } - auto src_config_dirs() { // TODO - string[] _config_dirs; - if (is_pod) { - } else { } - return _config_dirs; - } - auto src_image_dirs() { // TODO - string[] _image_dirs; - if (is_pod) { - } else { + return SRC_(); + } + auto output() { + struct Out_ { + auto path() { + auto _output_path = _env["pwd"]; + if ((_opt_actions.output_dir_set.length > 0) + && isValidPath(_opt_actions.output_dir_set) + ) { + _output_path = asNormalizedPath(_opt_actions.output_dir_set).array; + if (!exists(_output_path)) { + try { + _output_path.mkdirRecurse; + } + // catch (ErrnoException ex) { + catch (Exception ex) { + // Handle error + } + } + assert(_output_path.isDir, + "not a directory: " ~ _output_path); + // TODO always test that is a directory and it is writable + } + return _output_path; + } } - return _image_dirs; + return Out_(); } } return ManifestMatters_(); @@ -206,90 +313,95 @@ template ConfigFilePaths() { auto config_filename_document() { return "config_document"; } - auto possible_config_path_locations_document() { - /+ FIX clean up conf paths ↓ +/ - /+ config local site (file system only, not in pod) +/ - /+ return paths +/ - string[] _possible_config_path_locations; - if (_manifest.is_pod) { - /+ config document in pod +/ - string _sisudoc_conf_pod; - string _sisudoc_conf_pod_text; - _sisudoc_conf_pod = asNormalizedPath(chainPath( - to!string(_env["pwd"]), - _manifest.pod_manifest_path ~ "/conf" - )).array; - _sisudoc_conf_pod_text = asNormalizedPath(chainPath( - to!string(_env["pwd"]), - _manifest.pod_manifest_path ~ "/media/text/" ~ _manifest.src_lng ~ "/conf" - )).array; - /+ return paths +/ - _possible_config_path_locations = [ - _sisudoc_conf_pod_text, - _sisudoc_conf_pod, - ]; - } else { - /+ config document (& or local site) on filesystem +/ - string _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about - string _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array; - string _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array; - string _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array; - string _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array; - /+ return paths +/ - _possible_config_path_locations = [ - _sisudoc_conf_pwd, - _sisudoc_conf_pwd_a, - _sisudoc_conf_pwd_b, - _sisudoc_conf_pwd_c, - _sisudoc_conf_pwd_d, - ]; - } - /+ FIX clean up conf paths ↑ - (compare pwd to doc path location, and build config path) - +/ - return _possible_config_path_locations; - } - auto config_filename_site() { - return "config_local_site"; - } - auto possible_config_path_locations_local_site() { - /+ FIX clean up conf paths ↓ +/ - /+ config local site (file system only, not in pod) +/ - string _dot_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), ".sisu")).array; - string _underscore_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "_sisu")).array; - string _dot_home = asNormalizedPath(chainPath(to!string(_env["home"]), ".sisu")).array; - /+ return paths +/ - string[] _possible_config_path_locations; - if (_manifest.is_pod) { - _possible_config_path_locations = [ - _dot_pwd, - _underscore_pwd, - _dot_home, - "/etc/sisu" - ]; - } else { - /+ config document (& or local site) on filesystem +/ - string _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about - string _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array; - string _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array; - string _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array; - string _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array; - _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, - "/etc/sisu" - ]; - } - /+ FIX clean up conf paths ↑ - (compare pwd to doc path location, and build config path) - +/ - return _possible_config_path_locations; + auto possible_config_path_locations() { + struct _ConfFilePaths { + auto document() { + /+ FIX clean up conf paths ↓ +/ + /+ config local site (file system only, not in pod) +/ + /+ return paths +/ + string[] _possible_config_path_locations; + if (_manifest.src.is_pod) { + /+ config document in pod +/ + string _sisudoc_conf_pod; // + string _sisudoc_conf_pod_text; // + _sisudoc_conf_pod = asNormalizedPath(chainPath( + to!string(_env["pwd"]), + _manifest.pod.manifest_path ~ "/conf" + )).array; + _sisudoc_conf_pod_text = asNormalizedPath(chainPath( + to!string(_env["pwd"]), + _manifest.pod.manifest_path ~ "/media/text/" ~ _manifest.src.lng ~ "/conf" + )).array; + /+ return paths +/ + _possible_config_path_locations = [ + _sisudoc_conf_pod_text, + _sisudoc_conf_pod, + ]; + } else { + /+ config document (& or local site) on filesystem +/ + string _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about + string _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array; + string _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array; + string _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array; + string _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array; + /+ return paths +/ + _possible_config_path_locations = [ + _sisudoc_conf_pwd, + _sisudoc_conf_pwd_a, + _sisudoc_conf_pwd_b, + _sisudoc_conf_pwd_c, + _sisudoc_conf_pwd_d, + ]; + } + /+ FIX clean up conf paths ↑ + (compare pwd to doc path location, and build config path) + +/ + return _possible_config_path_locations; + } + auto config_filename_site() { + return "config_local_site"; + } + auto local_site() { + /+ FIX clean up conf paths ↓ +/ + /+ config local site (file system only, not in pod) +/ + string _dot_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), ".sisu")).array; + string _underscore_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "_sisu")).array; + string _dot_home = asNormalizedPath(chainPath(to!string(_env["home"]), ".sisu")).array; + /+ return paths +/ + string[] _possible_config_path_locations; + if (_manifest.src.is_pod) { + _possible_config_path_locations = [ + _dot_pwd, + _underscore_pwd, + _dot_home, + "/etc/sisu" + ]; + } else { + /+ config document (& or local site) on filesystem +/ + string _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about + string _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array; + string _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array; + string _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array; + string _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array; + _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, + "/etc/sisu" + ]; + } + /+ FIX clean up conf paths ↑ + (compare pwd to doc path location, and build config path) + +/ + return _possible_config_path_locations; + } + } + return _ConfFilePaths(); } } return ConfFilePaths(); @@ -398,50 +510,6 @@ template SiSUpathsSRC() { } #+END_SRC -*** pod archive base - -#+name: template_paths_sisupod -#+BEGIN_SRC d -template SiSUpathsSisupod() { - mixin SiSUrgxInit; - static auto rgx = Rgx(); - string _base_dir_pod = "sisupod"; - string _base_dir_doc = "sisudoc"; - string _suffix = ".zip"; - auto SiSUpathsSisupod()() { - struct _PathsStruct { - string base_filename(string fn_src) { - auto pth = fn_src.baseName.stripExtension; - return pth; - } - string sisupod_dir() { - auto pth = _base_dir_pod; - return pth; - } - string sisudoc_dir() { - auto pth = _base_dir_doc; - return pth; - } - string sisupod_filename(string fn_src) { - string pth = _base_dir_pod.chainPath(base_filename(fn_src) ~ _suffix).array; - return pth; - } - string base_filesystem(string fn_src) { - string pth = _base_dir_pod.chainPath(base_filename(fn_src)).array; - assert(pth == _base_dir_pod ~ "/" ~ base_filename(fn_src), - pth ~ " == " ~ _base_dir_pod ~ "/" ~ base_filename(fn_src) ~ "?"); - return pth; - } - string base_pod(string fn_src) { - string pth = _base_dir_pod.chainPath(base_filename(fn_src)).array; // change this - return pth; - } - } - return _PathsStruct(); - } -} -#+END_SRC - *** pods internal, zipped, unzipped #+name: template_paths_sisupods @@ -449,10 +517,12 @@ template SiSUpathsSisupod() { template SiSUpathsSisupods() { mixin SiSUrgxInit; static auto rgx = Rgx(); - string _base_dir_pod = "sisupod"; - string _base_dir_doc = "sisudoc"; string _suffix = ".zip"; - auto SiSUpathsSisupods()() { + auto SiSUpathsSisupods(Dm)(Dm doc_matters) { + string _base_dir_pod = (doc_matters.output_path.length > 0) + ? doc_matters.output_path ~ "/sisupod" + : "/sisupod"; + string _base_dir_doc = "sisudoc"; struct _PodPaths { string base_filename_(string fn_src) { auto pth = fn_src.baseName.stripExtension; diff --git a/org/default_regex.org b/org/default_regex.org index bf86258..57c442b 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -426,6 +426,7 @@ static src_fn_text = ctRegex!(`^(?P[a-z static src_fn_insert = ctRegex!(`^(?P[a-zA-Z0-9._-]+/)*(?P[a-zA-Z0-9._-]+[.]ssi)$`); static src_fn_find_inserts = ctRegex!(`^(?P[a-zA-Z0-9._-]+/)*(?P[a-zA-Z0-9._-]+[.]ss[im])$`); static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P[a-zA-Z0-9._-]+/)*(?P[a-zA-Z0-9._-]+[.]ss[ti])$`); +static src_base_parent_dir_name = ctRegex!(`[/](?P(?:[a-zA-Z0-9._-]+))(?:/media/text/[a-z]{2})$`); // formalizes dir structure #+END_SRC ** inline markup diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index 0caa15c..9f451e6 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -1091,8 +1091,8 @@ if ((obj_type_status["heading"] == State.on) : ocn_emit(OCNstatus.on); // : ocn_emit(obj_type_status["ocn_status"]); 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, conf_make_meta); + auto substantive_object_and_anchor_tags_tuple + = 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) { @@ -1126,10 +1126,10 @@ if ((obj_type_status["heading"] == State.on) break; } } - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to); + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to); /+ (incrementally build toc) table of contents here! +/ _anchor_tag=to!string(obj_cite_digits.on); the_table_of_contents_section = obj_im.table_of_contents_gather_headings( @@ -1145,8 +1145,8 @@ if ((obj_type_status["heading"] == State.on) html_segnames_ptr = html_segnames_ptr_cntr; html_segnames_ptr_cntr++; } - auto comp_obj_heading = - node_construct.node_emitter_heading( + auto comp_obj_heading + = node_construct.node_emitter_heading( an_object["substantive"], // string an_object["lev"], // string an_object["lev_markup_number"], // string @@ -1186,13 +1186,13 @@ if ((obj_type_status["heading"] == State.on) && (line_occur["para"] > State.off)) { /+ paragraph object (current line empty) +/ obj_cite_digits = ocn_emit(obj_type_status["ocn_status"]); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to); + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash(an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to); an_object["is"] = "para"; - auto comp_obj_heading = - node_construct.node_location_emitter( + auto comp_obj_heading + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -1200,8 +1200,8 @@ if ((obj_type_status["heading"] == State.on) heading_ptr-1, an_object["is"], ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = 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; @@ -1306,8 +1306,8 @@ if (the_document_body_section.length > 0) { #+name: abs_post #+BEGIN_SRC d -auto en_tuple = - note_section.endnote_objects(obj_cite_digits, opt_action); +auto en_tuple + = note_section.endnote_objects(obj_cite_digits, opt_action); static assert(!isTypeTuple!(en_tuple)); auto the_endnotes_section = en_tuple[0]; obj_cite_digits = en_tuple[1]; @@ -1360,8 +1360,8 @@ debug(glossary) { #+BEGIN_SRC d auto biblio_unsorted_incomplete = biblio_arr_json.dup; auto biblio = Bibliography(); -auto biblio_ordered = - biblio._bibliography_(biblio_unsorted_incomplete, bib_arr_json); +auto biblio_ordered + = biblio._bibliography_(biblio_unsorted_incomplete, bib_arr_json); #+END_SRC #+name: abs_post @@ -1506,8 +1506,8 @@ auto biblio_entry_tags_jsonstr = `{ #+name: abs_post #+BEGIN_SRC d auto bi = BookIndexReportSection(); -auto bi_tuple = - bi.bookindex_build_abstraction_section( +auto bi_tuple + = bi.bookindex_build_abstraction_section( bookindex_unordered_hashes, obj_cite_digits, opt_action, @@ -2498,8 +2498,8 @@ static auto _check_ocn_status_(L,T)( obj_type_status["ocn_status"] = OCNstatus.on; } } else { - obj_type_status["ocn_status"] = - obj_type_status["ocn_status_off_for_multiple_objects"]; + obj_type_status["ocn_status"] + = obj_type_status["ocn_status_off_for_multiple_objects"]; } } } else if ((!line.empty) && (obj_type_status["ocn_status_off_for_multiple_objects"] > TriState.off)) { @@ -2918,8 +2918,8 @@ void _biblio_block_( } switch (biblio_tag_name) { case "author_raw": // author_arr author (fn sn) - j["author_arr"] = - header_tag_value.split(rgx.arr_delimiter); + j["author_arr"] + = header_tag_value.split(rgx.arr_delimiter); string tmp; biblioAuthorLoop: foreach (au; j["author_arr"].array) { @@ -2933,8 +2933,8 @@ void _biblio_block_( j["author"].str = tmp; goto default; case "editor_raw": // editor_arr editor (fn sn) - j["editor_arr"] = - header_tag_value.split(rgx.arr_delimiter); + j["editor_arr"] + = header_tag_value.split(rgx.arr_delimiter); string tmp; biblioEditorLoop: foreach (ed; j["editor_arr"].array) { @@ -3184,8 +3184,8 @@ void _poem_block_(L,O,T,C,N,CMM)( ); } an_object["is"] = "verse"; - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = 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; @@ -3242,8 +3242,8 @@ void _poem_block_(L,O,T,C,N,CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = 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; @@ -3285,8 +3285,8 @@ void _poem_block_(L,O,T,C,N,CMM)( } 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, conf_make_meta); + auto substantive_obj_misc_tuple + = 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,8 +3334,8 @@ void _poem_block_(L,O,T,C,N,CMM)( } processing.remove("verse"); an_object["is"] = "verse"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -3343,8 +3343,8 @@ void _poem_block_(L,O,T,C,N,CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = 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; @@ -3478,8 +3478,8 @@ void _table_closed_make_special_notation_table_(N,CMM)( ) { comp_obj_block = comp_obj_block.init; obj_cite_digits = ocn_emit(OCNstatus.on); - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -3488,8 +3488,8 @@ void _table_closed_make_special_notation_table_(N,CMM)( "table" ); an_object["is"] = "table"; - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta); + auto substantive_obj_misc_tuple + = 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; @@ -3542,17 +3542,17 @@ void _block_flag_line_empty_(B,N,CMM)( #+BEGIN_SRC d if (obj_type_status["quote"] == TriState.closing) { obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "quote"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -3560,8 +3560,8 @@ void _block_flag_line_empty_(B,N,CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = 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; @@ -3592,17 +3592,17 @@ void _block_flag_line_empty_(B,N,CMM)( #+BEGIN_SRC d } else if (obj_type_status["group"] == TriState.closing) { obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "group"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -3610,8 +3610,8 @@ void _block_flag_line_empty_(B,N,CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = 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; @@ -3642,17 +3642,17 @@ void _block_flag_line_empty_(B,N,CMM)( #+BEGIN_SRC d } else if (obj_type_status["block"] == TriState.closing) { obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "block"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -3660,8 +3660,8 @@ void _block_flag_line_empty_(B,N,CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = 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"; @@ -3690,17 +3690,17 @@ void _block_flag_line_empty_(B,N,CMM)( #+name: abs_functions_block_line_status_empty #+BEGIN_SRC d } else if (obj_type_status["poem"] == TriState.closing) { - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "verse"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -3732,17 +3732,17 @@ void _block_flag_line_empty_(B,N,CMM)( #+BEGIN_SRC d } else if (obj_type_status["code"] == TriState.closing) { obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "code"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -3750,8 +3750,8 @@ void _block_flag_line_empty_(B,N,CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); + auto substantive_obj_misc_tuple + = 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; @@ -3783,17 +3783,17 @@ void _block_flag_line_empty_(B,N,CMM)( } else if (obj_type_status["table"] == TriState.closing) { comp_obj_block = comp_obj_block.init; obj_cite_digits = ocn_emit(OCNstatus.on); - an_object["bookindex_nugget"] = - ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; - bookindex_unordered_hashes = - bookindex_extract_hash.bookindex_nugget_hash( + an_object["bookindex_nugget"] + =("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : ""; + bookindex_unordered_hashes + = bookindex_extract_hash.bookindex_nugget_hash( an_object["bookindex_nugget"], obj_cite_digits, segment_anchor_tag_that_object_belongs_to ); an_object["is"] = "table"; - auto comp_obj_location = - node_construct.node_location_emitter( + auto comp_obj_location + = node_construct.node_location_emitter( content_non_header, segment_anchor_tag_that_object_belongs_to, obj_cite_digits, @@ -3801,9 +3801,9 @@ void _block_flag_line_empty_(B,N,CMM)( heading_ptr-1, an_object["is"] ); - auto substantive_obj_misc_tuple = - 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]; + auto substantive_obj_misc_tuple + = 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; comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; @@ -3918,8 +3918,8 @@ auto _heading_found_(L,X,H,R,T)( debug(headingsfound) { writeln(dochead_make_identify_unmarked_headings); } - char[][] make_headings_spl = - (cast(char[]) dochead_make_identify_unmarked_headings) + char[][] make_headings_spl + = (cast(char[]) dochead_make_identify_unmarked_headings) .split(rgx.make_heading_delimiter); debug(headingsfound) { writeln(make_headings_spl.length); @@ -3928,58 +3928,58 @@ auto _heading_found_(L,X,H,R,T)( switch (make_headings_spl.length) { case 7 : if (!empty(make_headings_spl[6])) { - heading_match_str["h_4"] = - "^(" ~ make_headings_spl[6].to!string ~ ")"; - heading_match_rgx["h_4"] = - regex(heading_match_str["h_4"]); + heading_match_str["h_4"] + = "^(" ~ make_headings_spl[6].to!string ~ ")"; + heading_match_rgx["h_4"] + = regex(heading_match_str["h_4"]); } goto case; case 6 : if (!empty(make_headings_spl[5])) { - heading_match_str["h_3"] = - "^(" ~ make_headings_spl[5].to!string ~ ")"; - heading_match_rgx["h_3"] = - regex(heading_match_str["h_3"]); + heading_match_str["h_3"] + = "^(" ~ make_headings_spl[5].to!string ~ ")"; + heading_match_rgx["h_3"] + = regex(heading_match_str["h_3"]); } goto case; case 5 : if (!empty(make_headings_spl[4])) { - heading_match_str["h_2"] = - "^(" ~ make_headings_spl[4].to!string ~ ")"; - heading_match_rgx["h_2"] = - regex(heading_match_str["h_2"]); + heading_match_str["h_2"] + = "^(" ~ make_headings_spl[4].to!string ~ ")"; + heading_match_rgx["h_2"] + = regex(heading_match_str["h_2"]); } goto case; case 4 : if (!empty(make_headings_spl[3])) { - heading_match_str["h_1"] = - "^(" ~ make_headings_spl[3].to!string ~ ")"; - heading_match_rgx["h_1"] = - regex(heading_match_str["h_1"]); + heading_match_str["h_1"] + = "^(" ~ make_headings_spl[3].to!string ~ ")"; + heading_match_rgx["h_1"] + = regex(heading_match_str["h_1"]); } goto case; case 3 : if (!empty(make_headings_spl[2])) { - heading_match_str["h_D"] = - "^(" ~ make_headings_spl[2].to!string ~ ")"; - heading_match_rgx["h_D"] = - regex(heading_match_str["h_D"]); + heading_match_str["h_D"] + = "^(" ~ make_headings_spl[2].to!string ~ ")"; + heading_match_rgx["h_D"] + = regex(heading_match_str["h_D"]); } goto case; case 2 : if (!empty(make_headings_spl[1])) { - heading_match_str["h_C"] = - "^(" ~ make_headings_spl[1].to!string ~ ")"; - heading_match_rgx["h_C"] = - regex(heading_match_str["h_C"]); + heading_match_str["h_C"] + = "^(" ~ make_headings_spl[1].to!string ~ ")"; + heading_match_rgx["h_C"] + = regex(heading_match_str["h_C"]); } goto case; case 1 : if (!empty(make_headings_spl[0])) { - heading_match_str["h_B"] = - "^(" ~ make_headings_spl[0].to!string ~ ")"; - heading_match_rgx["h_B"] = - regex(heading_match_str["h_B"]); + heading_match_str["h_B"] + = "^(" ~ make_headings_spl[0].to!string ~ ")"; + heading_match_rgx["h_B"] + = regex(heading_match_str["h_B"]); } break; default: @@ -4104,8 +4104,8 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)( .replaceFirst(rgx.variable_doc_author, conf_make_meta.meta.creator_author); collapsed_lev["h0"] = 0; - an_object["lev_collapsed_number"] = - collapsed_lev["h0"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h0"].to!string; lv["lv"] = DocStructMarkupHeading.h_sect_A; ++lv["h0"]; lv["h1"] = State.off; @@ -4118,8 +4118,8 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)( goto default; case "B": collapsed_lev["h1"] = collapsed_lev["h0"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h1"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h1"].to!string; lv["lv"] = DocStructMarkupHeading.h_sect_B; ++lv["h1"]; lv["h2"] = State.off; @@ -4131,8 +4131,8 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)( goto default; case "C": collapsed_lev["h2"] = collapsed_lev["h1"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h2"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h2"].to!string; lv["lv"] = DocStructMarkupHeading.h_sect_C; ++lv["h2"]; lv["h3"] = State.off; @@ -4143,8 +4143,8 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)( goto default; case "D": collapsed_lev["h3"] = collapsed_lev["h2"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h3"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h3"].to!string; lv["lv"] = DocStructMarkupHeading.h_sect_D; ++lv["h3"]; lv["h4"] = State.off; @@ -4162,8 +4162,8 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)( } else if (lv["h0"] > State.off) { collapsed_lev["h4"] = collapsed_lev["h0"] + 1; } - an_object["lev_collapsed_number"] = - collapsed_lev["h4"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h4"].to!string; lv["lv"] = DocStructMarkupHeading.h_text_1; ++lv["h4"]; lv["h5"] = State.off; @@ -4172,12 +4172,12 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)( goto default; case "2": if (lv["h5"] > State.off) { - an_object["lev_collapsed_number"] = - collapsed_lev["h5"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h5"].to!string; } else if (lv["h4"] > State.off) { collapsed_lev["h5"] = collapsed_lev["h4"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h5"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h5"].to!string; } lv["lv"] = DocStructMarkupHeading.h_text_2; ++lv["h5"]; @@ -4186,12 +4186,12 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)( goto default; case "3": if (lv["h6"] > State.off) { - an_object["lev_collapsed_number"] = - collapsed_lev["h6"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h6"].to!string; } else if (lv["h5"] > State.off) { collapsed_lev["h6"] = collapsed_lev["h5"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h6"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h6"].to!string; } lv["lv"] = DocStructMarkupHeading.h_text_3; ++lv["h6"]; @@ -4199,12 +4199,12 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)( goto default; case "4": if (lv["h7"] > State.off) { - an_object["lev_collapsed_number"] = - collapsed_lev["h7"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h7"].to!string; } else if (lv["h6"] > State.off) { collapsed_lev["h7"] = collapsed_lev["h6"] + 1; - an_object["lev_collapsed_number"] = - collapsed_lev["h7"].to!string; + an_object["lev_collapsed_number"] + = collapsed_lev["h7"].to!string; } lv["lv"] = DocStructMarkupHeading.h_text_4; ++lv["h7"]; @@ -4752,8 +4752,8 @@ static struct ObjInlineMarkupMunge { rgx.inline_notes_curly_sp_asterisk, (mkup.en_a_o ~ "*" ~ " $1" ~ mkup.en_a_c) ); - obj_txt_in = - obj_txt_in.replaceAll( + obj_txt_in + = obj_txt_in.replaceAll( rgx.inline_notes_curly_sp_plus, (mkup.en_a_o ~ "+" ~ " $1" ~ mkup.en_a_c) ); @@ -5375,7 +5375,7 @@ private: heading_num_3 = 0; } else if ( heading_num_top_level - == obj_["lev_markup_number"].to!uint + == obj_["lev_markup_number"].to!uint ) { heading_num_0 ++; heading_num_1 = 0; @@ -5383,26 +5383,26 @@ private: heading_num_3 = 0; } else if ( heading_num_top_level - == (obj_["lev_markup_number"].to!uint - 1) + == (obj_["lev_markup_number"].to!uint - 1) ) { heading_num_1 ++; heading_num_2 = 0; heading_num_3 = 0; } else if ( heading_num_top_level - == (obj_["lev_markup_number"].to!uint - 2) + == (obj_["lev_markup_number"].to!uint - 2) ) { heading_num_2 ++; heading_num_3 = 0; } else if ( heading_num_top_level - == (obj_["lev_markup_number"].to!uint - 3) + == (obj_["lev_markup_number"].to!uint - 3) ) { heading_num_3 ++; } if (heading_num_3 > 0) { - heading_number_auto_composite = - (heading_num_depth == 3) + heading_number_auto_composite + = (heading_num_depth == 3) ? ( heading_num_0.to!string ~ "." ~ heading_num_1.to!string ~ "." ~ heading_num_2.to!string ~ "." @@ -5410,8 +5410,8 @@ private: ) : ""; } else if (heading_num_2 > 0) { - heading_number_auto_composite = - ((heading_num_depth >= 2) + heading_number_auto_composite + = ((heading_num_depth >= 2) && (heading_num_depth <= 3)) ? ( heading_num_0.to!string ~ "." ~ heading_num_1.to!string ~ "." @@ -5419,16 +5419,16 @@ private: ) : ""; } else if (heading_num_1 > 0) { - heading_number_auto_composite = - ((heading_num_depth >= 1) + heading_number_auto_composite + = ((heading_num_depth >= 1) && (heading_num_depth <= 3)) ? ( heading_num_0.to!string ~ "." ~ heading_num_1.to!string ) : ""; } else if (heading_num_0 > 0) { - heading_number_auto_composite = - ((heading_num_depth >= 0) + heading_number_auto_composite + = ((heading_num_depth >= 0) && (heading_num_depth <= 3)) ? (heading_num_0.to!string) : ""; @@ -5870,10 +5870,10 @@ struct ObjAttributes { oa_j.object["obj_cite_number"] = _comp_obj_heading.ocn; oa_j.object["lev_markup_number"] = _comp_obj_heading.heading_lev_markup; oa_j.object["lev_collapsed_number"] = _comp_obj_heading.heading_lev_collapsed; - oa_j.object["heading_ptr"] = - _comp_obj_heading.ptr_heading; - oa_j.object["doc_object_ptr"] = - _comp_obj_heading.ptr_doc_object; + oa_j.object["heading_ptr"] + = _comp_obj_heading.ptr_heading; + oa_j.object["doc_object_ptr"] + = _comp_obj_heading.ptr_doc_object; } oa_j.object["parent_obj_cite_number"] = _comp_obj_heading.parent_ocn; oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.parent_lev_markup; @@ -5923,11 +5923,11 @@ struct BookIndexNuggetHash { body { static auto rgx = Rgx(); if (!bookindex_section.empty) { - auto bi_main_terms_split_arr = - bookindex_section.split(rgx.bi_main_terms_split); + auto bi_main_terms_split_arr + = bookindex_section.split(rgx.bi_main_terms_split); foreach (bi_main_terms_content; bi_main_terms_split_arr) { - auto bi_main_term_and_rest = - bi_main_terms_content.split(rgx.bi_main_term_plus_rest_split); + auto bi_main_term_and_rest + = bi_main_terms_content.split(rgx.bi_main_term_plus_rest_split); if (auto m = bi_main_term_and_rest[0].match( rgx.bi_term_and_obj_cite_numbers_match) ) { @@ -5944,8 +5944,8 @@ struct BookIndexNuggetHash { bi[main_term]["_a"] ~= obj_cite_numbers; obj_cite_numbers=null; if (bi_main_term_and_rest.length > 1) { - auto bi_sub_terms_split_arr = - bi_main_term_and_rest[1].split( + auto bi_sub_terms_split_arr + = bi_main_term_and_rest[1].split( rgx.bi_sub_terms_plus_obj_cite_number_offset_split ); foreach (sub_terms_bits; bi_sub_terms_split_arr) { @@ -5988,14 +5988,14 @@ struct BookIndexReportIndent { debug(asserts) { static assert(is(typeof(bookindex_unordered_hashes) == string[][string][string])); } - auto mainkeys= - bookindex_unordered_hashes.byKey.array.sort().release; + auto mainkeys + = bookindex_unordered_hashes.byKey.array.sort().release; foreach (mainkey; mainkeys) { debug(bookindex1) { writeln(mainkey); } - auto subkeys= - bookindex_unordered_hashes[mainkey].byKey.array.sort().release; + auto subkeys + = bookindex_unordered_hashes[mainkey].byKey.array.sort().release; foreach (subkey; subkeys) { debug(bookindex1) { writeln(" ", subkey); @@ -6041,8 +6041,8 @@ struct BookIndexReportSection { } writeln(" \\\\"); bookindex_unordered_hashes[mainkey].remove("_a"); - auto subkeys= - bookindex_unordered_hashes[mainkey].byKey.array.sort().release; + auto subkeys + = bookindex_unordered_hashes[mainkey].byKey.array.sort().release; foreach (subkey; subkeys) { write(" ", subkey, ", "); foreach (ref_; bookindex_unordered_hashes[mainkey][subkey]) { @@ -6078,8 +6078,8 @@ struct BookIndexReportSection { int heading_lev_markup, heading_lev_collapsed; string attrib; int[string] indent; - auto mainkeys = - bookindex_unordered_hashes.byKey.array.sort().release; + auto mainkeys + = bookindex_unordered_hashes.byKey.array.sort().release; ObjGenericComposite[][string] bookindex_section; ObjGenericComposite comp_obj_heading_, comp_obj_para; auto node_para_int_ = node_metadata_para_int; @@ -6142,8 +6142,8 @@ struct BookIndexReportSection { auto bkidx_lnk_seg(string locs) { string markup = ""; if (auto m = locs.matchFirst(rgx.book_index_go_seg)) { - markup = - munge.url_links("{ " ~ m["link"] ~ " }" + markup + = munge.url_links("{ " ~ m["link"] ~ " }" ~ mkup.mark_internal_site_lnk ~ m["seg"] ~ ".fnSuffix" ~ "#" ~ m["ocn"] ~ ", "); } else { @@ -6154,8 +6154,8 @@ struct BookIndexReportSection { auto bkidx_lnk_scroll(string locs) { string markup = ""; if (auto m = locs.matchFirst(rgx.book_index_go)) { - markup = - munge.url_links("{ " ~ m["link"] ~ " }" + markup + = munge.url_links("{ " ~ m["link"] ~ " }" ~ mkup.mark_internal_site_lnk ~ "#" ~ m["ocn"] ~ ", "); } else { @@ -6170,8 +6170,8 @@ struct BookIndexReportSection { bi_tmp_scroll ~= " \\\\\n "; bi_tmp_seg ~= " \\\\\n "; bookindex_unordered_hashes[mainkey].remove("_a"); - auto subkeys = - bookindex_unordered_hashes[mainkey].byKey.array.sort().release; + auto subkeys + = bookindex_unordered_hashes[mainkey].byKey.array.sort().release; foreach (subkey; subkeys) { bi_tmp_scroll ~= subkey ~ ", "; buffer.clear(); @@ -6462,8 +6462,8 @@ struct Bibliography { } } body { - JSONValue[] biblio_unsorted = - _biblio_unsorted_complete_(biblio_unsorted_incomplete, bib_arr_json); + JSONValue[] biblio_unsorted + = _biblio_unsorted_complete_(biblio_unsorted_incomplete, bib_arr_json); biblio_arr_json = []; biblio_unsorted_incomplete = []; JSONValue[] biblio_sorted__ = biblio_sort(biblio_unsorted); @@ -6519,8 +6519,8 @@ struct Bibliography { } bib_arr_json ~= j; } - JSONValue[] biblio_unsorted_array_of_json_objects = - bib_arr_json.dup; + JSONValue[] biblio_unsorted_array_of_json_objects + = bib_arr_json.dup; destroy(bib_arr_json); return biblio_unsorted_array_of_json_objects; } @@ -6535,8 +6535,8 @@ struct Bibliography { static assert(is(typeof(biblio_unordered) == JSONValue[])); } JSONValue[] biblio_sorted_; - biblio_sorted_ = - sort!((a, b){ + biblio_sorted_ + = sort!((a, b){ return ((a["sortby_deemed_author_year_title"].str) < (b["sortby_deemed_author_year_title"].str)); })(biblio_unordered).array; debug(bibliosorted) { @@ -6716,24 +6716,24 @@ struct NodeStructureMetadata { lv = DocStructMarkupHeading.h_sect_B; lv1 = obj_cite_digit; lv2=0; lv3=0; lv4=0; lv5=0; lv6=0; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_A; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_A; p_["obj_cite_number"] = lv0; break; case 2: lv = DocStructMarkupHeading.h_sect_C; lv2 = obj_cite_digit; lv3=0; lv4=0; lv5=0; lv6=0; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_B; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_B; p_["obj_cite_number"] = lv1; break; case 3: lv = DocStructMarkupHeading.h_sect_D; lv3=obj_cite_digit; lv4=0; lv5=0; lv6=0; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_C; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_C; p_["obj_cite_number"] = lv2; break; case 4: @@ -6741,20 +6741,20 @@ struct NodeStructureMetadata { lv4 = obj_cite_digit; lv5=0; lv6=0; lv7=0; if (lv3 > State.off) { - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_D; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_D; p_["obj_cite_number"] = lv3; } else if (lv2 > State.off) { - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_C; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_C; p_["obj_cite_number"] = lv2; } else if (lv1 > State.off) { - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_B; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_B; p_["obj_cite_number"] = lv1; } else { - p_["lev_markup_number"] = - DocStructMarkupHeading.h_sect_A; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_sect_A; p_["obj_cite_number"] = lv0; } break; @@ -6762,23 +6762,23 @@ struct NodeStructureMetadata { lv = DocStructMarkupHeading.h_text_2; lv5 = obj_cite_digit; lv6=0; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_text_1; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_text_1; p_["obj_cite_number"] = lv4; break; case 6: lv = DocStructMarkupHeading.h_text_3; lv6 = obj_cite_digit; lv7=0; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_text_2; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_text_2; p_["obj_cite_number"] = lv5; break; case 7: lv = DocStructMarkupHeading.h_text_4; lv7 = obj_cite_digit; - p_["lev_markup_number"] = - DocStructMarkupHeading.h_text_3; + p_["lev_markup_number"] + = DocStructMarkupHeading.h_text_3; p_["obj_cite_number"] = lv6; break; default: diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index efd0234..1494410 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -98,8 +98,8 @@ private auto docHeaderSDLtagGet(Hs)(Hs src_header) { debug(asserts){ static assert(is(typeof(src_header) == char[])); } - char[][] source_header_arr = - (cast(char[]) src_header).split(rgx.newline_eol_delimiter); + char[][] source_header_arr + = (cast(char[]) src_header).split(rgx.newline_eol_delimiter); char[] _src_header; foreach(header_line; source_header_arr) { if (!match(header_line, rgx.comments)) { @@ -287,12 +287,12 @@ private auto docSDLtoStruct(C,Tag)(C _conf_composite, Tag header_sdlang) { Tag _maintag = header_sdlang.getTag("title"); if (_maintag !is null) { if ("main" in _maintag.maybe.tags) { - _conf_composite.meta.title_main = - to!string(_maintag.getTagValues("main")); + _conf_composite.meta.title_main + = to!string(_maintag.getTagValues("main")); } else if ("main" !in _maintag.maybe.attributes) { writeln(_maintag.values[0]); // document title - _conf_composite.meta.title_main = - (_maintag.values[0]).to!string; // test that this exists + _conf_composite.meta.title_main + = (_maintag.values[0]).to!string; // test that this exists } } } diff --git a/org/meta_debugs.org b/org/meta_debugs.org index c381ebf..f623076 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -34,7 +34,7 @@ template SiSUdebugs() { <> <> debug(checkdoc) { - if ((doc_matters.opt_action.do_debug)) { + if ((doc_matters.opt.action.debug_do)) { <> <> } @@ -87,7 +87,7 @@ debug(parent) { __FILE__, __LINE__, ); - foreach (key; doc_matters.keys_seq.seg) { + foreach (key; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[key]) { if (obj.of_part != "empty") { if (obj.is_a == "heading") { @@ -116,14 +116,16 @@ debug(dumpdoc) { __FILE__, __LINE__, ); - foreach (obj; contents[key]) { - if (obj.of_part != "empty") { - writefln( - "[%s][%s]\n%s", - obj.obj_cite_number, - obj.is_a, - obj.text - ); + if (key.length > 0) { + foreach (obj; contents[key]) { + if (obj.of_part != "empty") { + writefln( + "[%s][%s]\n%s", + obj.obj_cite_number, + obj.is_a, + obj.text + ); + } } } } @@ -138,11 +140,11 @@ debug(checkdoc) { auto return ref const S contents, auto return ref T doc_matters, ) { - foreach (key; doc_matters.keys_seq.seg) { + foreach (key; doc_matters.xml.keys_seq.seg) { if (contents[key].length > 1) { foreach (obj; contents[key]) { if (obj.heading_lev_markup == 4) { - writeln(obj.ptr_html_segnames, ". (", doc_matters.segnames[obj.ptr_html_segnames], ") -> ", obj.text); + writeln(obj.ptr_html_segnames, ". (", doc_matters.xml.segnames[obj.ptr_html_segnames], ") -> ", obj.text); } } } @@ -305,7 +307,7 @@ debug(section_body) { #+BEGIN_SRC d debug(toc_nav_dom) { enum DomTags { none, open, close, close_and_open, open_still, } - foreach (sect; doc_matters.keys_seq.seg) { + foreach (sect; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[sect]) { if (obj.is_a == "heading") { foreach_reverse (k; 0 .. 7) { @@ -332,7 +334,7 @@ debug(toc_nav_dom) { } } writeln("--------------------"); - foreach (sect; doc_matters.keys_seq.seg) { + foreach (sect; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[sect]) { if (obj.is_a == "heading") { foreach_reverse (k; 0 .. 7) { @@ -665,7 +667,7 @@ debug(anchor) { __FILE__, __LINE__, ); - foreach (k; doc_matters.keys_seq.seg) { + foreach (k; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[k]) { if (obj.is_a == "heading") { writefln( @@ -687,7 +689,7 @@ debug(anchor) { #+name: meta_output_debugs #+BEGIN_SRC d debug(heading) { // heading - foreach (k; doc_matters.keys_seq.seg) { + foreach (k; doc_matters.xml.keys_seq.seg) { foreach (o; contents[k]) { if (o.is_a == "heading") { writefln( @@ -714,7 +716,7 @@ debug(headings) { __FILE__, __LINE__, ); - foreach (k; doc_matters.keys_seq.seg) { + foreach (k; doc_matters.xml.keys_seq.seg) { foreach (obj; contents[k]) { if (obj.is_a == "heading") { writefln( @@ -744,8 +746,8 @@ debug(summary) { #+name: meta_output_debugs_summary #+BEGIN_SRC d debug(checkdoc) { - if (auto mfn=match(doc_matters.source_filename, rgx.src_fn)) { - if (doc_matters.opt_action.assertions) { + if (auto mfn=match(doc_matters.src.filename, rgx.src_fn)) { + if (doc_matters.opt.action.assertions) { switch (mfn.captures[2]) { // live manual: case "live-manual.ssm": @@ -864,7 +866,7 @@ debug(checkdoc) { // error in bookindex ... (ch7 ... building the cc machine, an extra semi colon) break; default: - writeln(doc_matters.source_filename); + writeln(doc_matters.src.filename); break; } } diff --git a/org/meta_read_source_files.org b/org/meta_read_source_files.org index 3c92560..a3a59a5 100644 --- a/org/meta_read_source_files.org +++ b/org/meta_read_source_files.org @@ -49,9 +49,13 @@ static template configInSite() { <> final string configInSite(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_site; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations_local_site; + string conf_sdl = conf_file_details.possible_config_path_locations.config_filename_site; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations.local_site; string config_file_str; + debug(io) { + writeln("in config filename: ", conf_sdl); + writeln("in config possible path locations: ", possible_config_path_locations); + } foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { @@ -59,8 +63,8 @@ static template configInSite() { } try { if (exists(conf_file)) { - debug(configfile) { - writeln(conf_file); + debug(io) { + writeln("in config file found: ", conf_file); } config_file_str = conf_file.readText; break; @@ -83,8 +87,12 @@ static template configInDoc() { final string configInDoc(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); string conf_sdl = conf_file_details.config_filename_document; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations_document; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations.document; string config_file_str; + debug(io) { + writeln("in config filename: ", conf_sdl); + writeln("in config possible path locations: ", possible_config_path_locations); + } foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { @@ -92,8 +100,8 @@ static template configInDoc() { } try { if (exists(conf_file)) { - debug(configfile) { - writeln(conf_file); + debug(io) { + writeln("in config file found: ", conf_file); } config_file_str = conf_file.readText; break; @@ -159,13 +167,13 @@ static template configReadDoc() { } #+END_SRC -*** config hub import sdlang +*** config hub _import sdlang_ #+name: meta_config_file_import_mixin #+BEGIN_SRC d import sdlang; #+END_SRC -*** config hub function +*** config hub function read makes for site & doc Read in sdl config file name given, and return sdl root @@ -174,7 +182,7 @@ Read in sdl config file name given, and return sdl root final auto configReadSite(M,E)(M manifest, E env) { auto configuration = configInSite!()(manifest, env); auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_site; + string conf_sdl = conf_file_details.possible_config_path_locations.config_filename_site; auto sdl_root = ConfigSDLang!()(configuration, conf_sdl); return sdl_root; } @@ -218,37 +226,37 @@ static template SiSUrawMarkupContent() { } auto rawsrc = RawMarkupContent(); auto SiSUrawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) { - auto _0_header_1_body_content_2_insert_filelist_tuple = - rawsrc.sourceContentSplitIntoHeaderAndBody(_opt_action, rawsrc.sourceContent(fn_src), fn_src); + auto _0_header_1_body_content_2_insert_filelist_tuple + = rawsrc.sourceContentSplitIntoHeaderAndBody(_opt_action, rawsrc.sourceContent(fn_src), fn_src); return _0_header_1_body_content_2_insert_filelist_tuple; } struct RawMarkupContent { final sourceContent(in string fn_src) { auto raw = MarkupRawUnit(); - auto source_txt_str = - raw.markupSourceReadIn(fn_src); + auto source_txt_str + = raw.markupSourceReadIn(fn_src); return source_txt_str; } final auto sourceContentSplitIntoHeaderAndBody(O)(O _opt_action, in string source_txt_str, in string fn_src="") { auto raw = MarkupRawUnit(); string[] insert_file_list; string[] images_list; - auto t = - raw.markupSourceHeaderContentRawLineTupleArray(source_txt_str); + auto t + = raw.markupSourceHeaderContentRawLineTupleArray(source_txt_str); auto header_raw = t[0]; auto sourcefile_body_content = t[1]; if (fn_src.match(rgx.src_fn_master)) { // filename with path needed if master file (.ssm) not otherwise auto ins = Inserts(); - auto tu = - ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); + auto tu + = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); static assert(!isTypeTuple!(tu)); sourcefile_body_content = tu[0]; insert_file_list = tu[1].dup; images_list = tu[2].dup; } else if (_opt_action.source || _opt_action.sisupod) { auto ins = Inserts(); - auto tu = - ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); + auto tu + = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); static assert(!isTypeTuple!(tu)); images_list = tu[2].dup; } @@ -316,6 +324,9 @@ final private string readInMarkupSource(in char[] fn_src) { string source_txt_str; try { if (exists(fn_src)) { + debug(io) { + writeln("in src, markup source file found: ", fn_src); + } source_txt_str = fn_src.readText; } } @@ -334,7 +345,6 @@ final private string readInMarkupSource(in char[] fn_src) { **** notes source_txt_str = readText(fn_src); // ok - catch (ErrnoException ex) { } @@ -365,8 +375,8 @@ final private char[][] header0Content1(in string src_text) { #+name: meta_markup_source_raw_source_line_array #+BEGIN_SRC d final private char[][] markupSourceLineArray(in char[] src_text) { - char[][] source_line_arr = - (cast(char[]) src_text).split(rgx.newline_eol_strip_preceding); + char[][] source_line_arr + = (cast(char[]) src_text).split(rgx.newline_eol_strip_preceding); return source_line_arr; } #+END_SRC @@ -495,11 +505,11 @@ if (type1["curly_code"] == 1) { type1["header_meta"] = 0; auto insert_fn = m.captures[2]; auto insert_sub_pth = m.captures[1]; - auto fn_src_insert = - chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array; + auto fn_src_insert + = chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array; auto raw = MarkupRawUnit(); - auto markup_sourcesubfile_insert_content = - raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts); + auto markup_sourcesubfile_insert_content + = raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts); debug(insert_file) { tell_l("red", line); tell_l("red", fn_src_insert); @@ -584,8 +594,8 @@ if (type["curly_code"] == 1) { } else if (auto m = line.match(rgx.insert_src_fn_ssi_or_sst)) { auto insert_fn = m.captures[2]; auto insert_sub_pth = m.captures[1]; - auto fn_src_insert = - chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array; + auto fn_src_insert + = chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array; insert_file_list ~= to!string(fn_src_insert); auto raw = MarkupRawUnit(); /+ TODO +/ @@ -593,8 +603,8 @@ if (type["curly_code"] == 1) { /+ .sst when inserted, not used: headers and heading level ^:?A~ so remove +/ writeln(__LINE__); writeln(ma); } - auto markup_sourcefile_insert_content = - raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts); + auto markup_sourcefile_insert_content + = raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts); debug(insert_file) { tell_l("red", line); tell_l("red", fn_src_insert); diff --git a/org/output_hub.org b/org/output_hub.org index e8709f2..b147cd6 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -62,8 +62,8 @@ import sdp.output, #+name: output_options #+BEGIN_SRC d -if ((doc_matters.opt_action.verbose)) { - writeln(doc_matters.keys_seq.seg); +if ((doc_matters.opt.action.verbose)) { + writeln(doc_matters.xml.keys_seq.seg); } #+END_SRC @@ -72,23 +72,27 @@ if ((doc_matters.opt_action.verbose)) { #+name: output_options #+BEGIN_SRC d -if ((doc_matters.opt_action.source) -|| (doc_matters.opt_action.sisupod)) { - if ((doc_matters.opt_action.verbose) - && (doc_matters.opt_action.source)) - { writeln("sisu source processing... "); } - if ((doc_matters.opt_action.verbose) - && (doc_matters.opt_action.sisupod)) - { writeln("sisupod source processing... "); } +if ((doc_matters.opt.action.source) +|| (doc_matters.opt.action.sisupod)) { + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.source)) { + writeln("sisu source processing... "); + } + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.sisupod)) { + writeln("sisupod source processing... "); + } SiSUpod!()(doc_matters); - if ((doc_matters.opt_action.verbose) - && (doc_matters.opt_action.debug_do) - && (doc_matters.opt_action.source)) - { writeln("sisu source done"); } - if ((doc_matters.opt_action.verbose) - && (doc_matters.opt_action.debug_do) - && (doc_matters.opt_action.sisupod)) - { writeln("sisupod done"); } + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.debug_do) + && (doc_matters.opt.action.source)) { + writeln("sisu source done"); + } + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.debug_do) + && (doc_matters.opt.action.sisupod)) { + writeln("sisupod done"); + } } #+END_SRC @@ -97,9 +101,11 @@ if ((doc_matters.opt_action.source) #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action.text) { +if (doc_matters.opt.action.text) { /+ mixin outputText; +/ - if ((doc_matters.opt_action.verbose)) { writeln("text processing... "); } + if ((doc_matters.opt.action.verbose)) { + writeln("text processing... "); + } } #+END_SRC @@ -108,23 +114,43 @@ if (doc_matters.opt_action.text) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action.html) { - if ((doc_matters.opt_action.verbose)) { writeln("html scroll processing... "); } +if (doc_matters.opt.action.html) { + if ((doc_matters.opt.action.verbose)) { + writeln("html scroll processing... "); + } outputHTML!().scroll(doc_abstraction, doc_matters); - if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("html scroll done"); } - if ((doc_matters.opt_action.verbose)) { writeln("html seg processing... "); } + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.debug_do)) { + writeln("html scroll done"); + } + if ((doc_matters.opt.action.verbose)) { + writeln("html seg processing... "); + } outputHTML!().seg(doc_abstraction, doc_matters); - if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("html seg done"); } + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.debug_do)) { + writeln("html seg done"); + } outputHTML!().css(doc_matters); -} else if (doc_matters.opt_action.html_seg) { - if ((doc_matters.opt_action.verbose)) { writeln("html seg processing... "); } +} else if (doc_matters.opt.action.html_seg) { + if ((doc_matters.opt.action.verbose)) { + writeln("html seg processing... "); + } outputHTML!().seg(doc_abstraction, doc_matters); - if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("html seg done"); } + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.debug_do)) { + writeln("html seg done"); + } outputHTML!().css(doc_matters); -} else if (doc_matters.opt_action.html_scroll) { - if ((doc_matters.opt_action.verbose)) { writeln("html scroll processing... "); } +} else if (doc_matters.opt.action.html_scroll) { + if ((doc_matters.opt.action.verbose)) { + writeln("html scroll processing... "); + } outputHTML!().scroll(doc_abstraction, doc_matters); - if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("html scroll done"); } + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.debug_do)) { + writeln("html scroll done"); + } outputHTML!().css(doc_matters); } #+END_SRC @@ -134,11 +160,16 @@ if (doc_matters.opt_action.html) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action.epub) { - if ((doc_matters.opt_action.verbose)) { writeln("epub3 processing... "); } +if (doc_matters.opt.action.epub) { + if ((doc_matters.opt.action.verbose)) { + writeln("epub3 processing... "); + } outputEPub3!()(doc_abstraction, doc_matters); // epub.css_write; - if ((doc_matters.opt_action.verbose) && (doc_matters.opt_action.debug_do)) { writeln("epub3 done"); } + if ((doc_matters.opt.action.verbose) + && (doc_matters.opt.action.debug_do)) { + writeln("epub3 done"); + } } #+END_SRC @@ -146,7 +177,7 @@ if (doc_matters.opt_action.epub) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action.pdf) { +if (doc_matters.opt.action.pdf) { /+ mixin outputPDF; +/ writeln("pdf processing"); } @@ -156,7 +187,7 @@ if (doc_matters.opt_action.pdf) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action.odt) { +if (doc_matters.opt.action.odt) { /+ mixin outputODT; +/ writeln("odt processing"); } @@ -167,8 +198,10 @@ if (doc_matters.opt_action.odt) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action.sqlite_discrete) { - if ((doc_matters.opt_action.verbose)) { writeln("sqlite processing... "); } +if (doc_matters.opt.action.sqlite_discrete) { + if ((doc_matters.opt.action.verbose)) { + writeln("sqlite processing... "); + } SQLiteDiscreteBuildTablesAndPopulate!()(doc_abstraction, doc_matters); } #+END_SRC @@ -177,8 +210,10 @@ if (doc_matters.opt_action.sqlite_discrete) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action.sqlite_update) { - if ((doc_matters.opt_action.verbose)) { writeln("sqlite processing... "); } +if (doc_matters.opt.action.sqlite_update) { + if ((doc_matters.opt.action.verbose)) { + writeln("sqlite processing... "); + } SQLiteBuildTablesAndPopulate!()(doc_abstraction, doc_matters); } #+END_SRC @@ -189,11 +224,15 @@ if (doc_matters.opt_action.sqlite_update) { #+name: output_options_op #+BEGIN_SRC d if ((opt_action.sqlite_create)) { - if ((opt_action.verbose)) { writeln("sqlite create table... "); } + if ((opt_action.verbose)) { + writeln("sqlite create table... "); + } SQLiteTablesCreate!()(); } if ((opt_action.sqlite_drop)) { - if ((opt_action.verbose)) { writeln("sqlite drop table... "); } + if ((opt_action.verbose)) { + writeln("sqlite drop table... "); + } SQLiteTablesDrop!()(); } #+END_SRC @@ -202,7 +241,7 @@ if ((opt_action.sqlite_drop)) { #+name: output_options #+BEGIN_SRC d -if (doc_matters.opt_action.postgresql) { +if (doc_matters.opt.action.postgresql) { /+ mixin outputPostgreSQL; +/ writeln("pgsql processing"); } diff --git a/org/output_sisupod.org b/org/output_sisupod.org index 8e6aeb7..1031456 100644 --- a/org/output_sisupod.org +++ b/org/output_sisupod.org @@ -61,14 +61,14 @@ debug(asserts) { // static assert(is(typeof(doc_matters) == tuple)); } mixin SiSUoutputRgxInit; -string pwd = doc_matters.environment.pwd; -auto src_path_info = doc_matters.src_path_info; -auto pth_sisudoc_src = doc_matters.src_path_info; -auto pths_sisupod = SiSUpathsSisupods!()(); +string pwd = doc_matters.env.pwd; +auto src_path_info = doc_matters.src.path_info; +auto pth_sisudoc_src = doc_matters.src.path_info; +auto pths_sisupod = SiSUpathsSisupods!()(doc_matters); mixin SiSUlanguageCodes; auto lang = Lang(); static auto rgx = Rgx(); -assert (doc_matters.source_filename.match(rgx.src_fn)); +assert (doc_matters.src.filename.match(rgx.src_fn)); #+END_SRC #+name: source_sisupod_mkdirs @@ -78,24 +78,24 @@ if (!exists(pths_sisupod.sisupod_dir_())) { // used both by sisupod zipped (& sisupod filesystem (unzipped) which makes its own recursive dirs) pths_sisupod.sisupod_dir_().mkdirRecurse; } -if (doc_matters.opt_action.source) { - if (!exists(pths_sisupod.text_root(doc_matters.source_filename).filesystem_open_zpod)) { - pths_sisupod.text_root(doc_matters.source_filename).filesystem_open_zpod.mkdirRecurse; +if (doc_matters.opt.action.source) { + if (!exists(pths_sisupod.text_root(doc_matters.src.filename).filesystem_open_zpod)) { + pths_sisupod.text_root(doc_matters.src.filename).filesystem_open_zpod.mkdirRecurse; } - if (!exists(pths_sisupod.conf_root(doc_matters.source_filename).filesystem_open_zpod)) { - pths_sisupod.conf_root(doc_matters.source_filename).filesystem_open_zpod.mkdirRecurse; + if (!exists(pths_sisupod.conf_root(doc_matters.src.filename).filesystem_open_zpod)) { + pths_sisupod.conf_root(doc_matters.src.filename).filesystem_open_zpod.mkdirRecurse; } - if (!exists(pths_sisupod.media_root(doc_matters.source_filename).filesystem_open_zpod)) { - pths_sisupod.media_root(doc_matters.source_filename).filesystem_open_zpod.mkdirRecurse; + if (!exists(pths_sisupod.media_root(doc_matters.src.filename).filesystem_open_zpod)) { + pths_sisupod.media_root(doc_matters.src.filename).filesystem_open_zpod.mkdirRecurse; } - if (!exists(pths_sisupod.css(doc_matters.source_filename).filesystem_open_zpod)) { - pths_sisupod.css(doc_matters.source_filename).filesystem_open_zpod.mkdirRecurse; + if (!exists(pths_sisupod.css(doc_matters.src.filename).filesystem_open_zpod)) { + pths_sisupod.css(doc_matters.src.filename).filesystem_open_zpod.mkdirRecurse; } - if (!exists(pths_sisupod.image_root(doc_matters.source_filename).filesystem_open_zpod)) { - pths_sisupod.image_root(doc_matters.source_filename).filesystem_open_zpod.mkdirRecurse; + if (!exists(pths_sisupod.image_root(doc_matters.src.filename).filesystem_open_zpod)) { + pths_sisupod.image_root(doc_matters.src.filename).filesystem_open_zpod.mkdirRecurse; } - if (!exists(pths_sisupod.doc_lng(doc_matters.source_filename, doc_matters.language).filesystem_open_zpod)) { - pths_sisupod.doc_lng(doc_matters.source_filename, doc_matters.language).filesystem_open_zpod.mkdirRecurse; + if (!exists(pths_sisupod.doc_lng(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod)) { + pths_sisupod.doc_lng(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod.mkdirRecurse; } } #+END_SRC @@ -106,28 +106,35 @@ if (doc_matters.opt_action.source) { #+BEGIN_SRC d debug(sisupod) { writeln(__LINE__, ": ", - doc_matters.source_filename, " -> ", - pths_sisupod.fn_doc(doc_matters.source_filename, doc_matters.language).filesystem_open_zpod + doc_matters.src.filename, " -> ", + pths_sisupod.fn_doc(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod ); } auto zip = new ZipArchive(); -auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.source_filename).zpod; +auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.src.filename).zpod; { /+ bundle images +/ - foreach (image; doc_matters.image_list) { + foreach (image; doc_matters.src.image_list) { debug(sisupodimages) { writeln( pth_sisudoc_src.image_root.to!string, "/", image, " -> ", - pths_sisupod.image_root(doc_matters.source_filename).zpod, "/", image + pths_sisupod.image_root(doc_matters.src.filename).zpod, "/", image ); } auto fn_src_in = pth_sisudoc_src.image_root.to!string ~ "/" ~ image; - auto fn_src_out_sisupod_zip_base = pths_sisupod.image_root(doc_matters.source_filename).zpod.to!string ~ "/" ~ image; - auto fn_src_out_filesystem = pths_sisupod.image_root(doc_matters.source_filename).filesystem_open_zpod.to!string ~ "/" ~ image; + auto fn_src_out_sisupod_zip_base + = pths_sisupod.image_root(doc_matters.src.filename).zpod.to!string + ~ "/" ~ image; + auto fn_src_out_filesystem + = pths_sisupod.image_root(doc_matters.src.filename).filesystem_open_zpod.to!string + ~ "/" ~ image; if (exists(fn_src_in)) { - if (doc_matters.opt_action.source) { + debug(io) { + writeln("src out found: ", fn_src_in); + } + if (doc_matters.opt.action.source) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt_action.sisupod) { + if (doc_matters.opt.action.sisupod) { auto zip_arc_member_file = new ArchiveMember(); zip_arc_member_file.name = fn_src_out_sisupod_zip_base; auto zip_data = new OutBuffer(); @@ -135,17 +142,28 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.source_filename).zpo zip_arc_member_file.expandedData = zip_data.toBytes(); zip.addMember(zip_arc_member_file); } + } else { + if (doc_matters.opt.action.verbose) { + writeln("src out NOT found (image): ", fn_src_in); + } } } } { /+ bundle sisu_document_make +/ - auto fn_src_in = pth_sisudoc_src.conf_root.to!string ~ "/" ~ "sisu_document_make"; // check (_sisu/sisu_document_make) - auto fn_src_out_sisupod_zip_base = pths_sisupod.conf_root(doc_matters.source_filename).zpod.to!string ~ "/" ~ "sisu_document_make"; - auto fn_src_out_filesystem = pths_sisupod.conf_root(doc_matters.source_filename).filesystem_open_zpod.to!string ~ "/" ~ "sisu_document_make"; + auto fn_src_in + = pth_sisudoc_src.conf_root.to!string ~ "/" ~ "sisu_document_make"; // check (_sisu/sisu_document_make) + auto fn_src_out_sisupod_zip_base + = pths_sisupod.conf_root(doc_matters.src.filename).zpod.to!string ~ "/" ~ "sisu_document_make"; + auto fn_src_out_filesystem + = pths_sisupod.conf_root(doc_matters.src.filename).filesystem_open_zpod.to!string + ~ "/" ~ "sisu_document_make"; // TODO if (exists(fn_src_in)) { - if (doc_matters.opt_action.source) { + debug(io) { + writeln("src out found: ", fn_src_in); + } + if (doc_matters.opt.action.source) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt_action.sisupod) { + if (doc_matters.opt.action.sisupod) { auto zip_arc_member_file = new ArchiveMember(); zip_arc_member_file.name = fn_src_out_sisupod_zip_base; auto zip_data = new OutBuffer(); @@ -153,25 +171,36 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.source_filename).zpo zip_arc_member_file.expandedData = zip_data.toBytes(); zip.addMember(zip_arc_member_file); } + } else { + if (doc_matters.opt.action.verbose) { + writeln("src out NOT found (document make): ", fn_src_in); + } } } { /+ TODO bundle primary file +/ - auto fn_src_in = doc_matters.source_filename; - auto fn_src_out_sisupod_zip_base = pths_sisupod.fn_doc(doc_matters.source_filename, doc_matters.language).zpod.to!string; - auto fn_src_out_filesystem = pths_sisupod.fn_doc(doc_matters.source_filename, doc_matters.language).filesystem_open_zpod.to!string; // needed without root path: - auto fn_src_out_inside_pod = pths_sisupod.fn_doc(doc_matters.source_filename, doc_matters.language).zpod.to!string; // needed without root path: + auto fn_src_in = doc_matters.src.file_with_absolute_path.to!string; + auto fn_src_out_sisupod_zip_base + = pths_sisupod.fn_doc(doc_matters.src.filename, doc_matters.src.language).zpod.to!string; + auto fn_src_out_filesystem + = pths_sisupod.fn_doc(doc_matters.src.filename, doc_matters.src.language).filesystem_open_zpod.to!string; // needed without root path: + auto fn_src_out_inside_pod + = pths_sisupod.fn_doc(doc_matters.src.filename, doc_matters.src.language).zpod.to!string; // needed without root path: string[] filelist_src_out_sisupod_arr; string[] filelist_src_zpod_arr; if (exists(fn_src_in)) { - filelist_src_out_sisupod_arr ~= fn_src_out_sisupod_zip_base; + debug(io) { + writeln("src out found: ", fn_src_in); + } + filelist_src_out_sisupod_arr ~= fn_src_out_sisupod_zip_base; filelist_src_zpod_arr ~= fn_src_out_inside_pod; - if (doc_matters.opt_action.source) { - auto filelist = File(pths_sisupod.fn_pod_filelist(doc_matters.source_filename).filesystem_open_zpod, "w"); + if (doc_matters.opt.action.source) { + auto filelist + = File(pths_sisupod.fn_pod_filelist(doc_matters.src.filename).filesystem_open_zpod, "w"); foreach (source_pth_and_fn; filelist_src_zpod_arr) { filelist.writeln(source_pth_and_fn); } fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt_action.sisupod) { + if (doc_matters.opt.action.sisupod) { auto zip_arc_member_file = new ArchiveMember(); zip_arc_member_file.name = fn_src_out_sisupod_zip_base; auto zip_data = new OutBuffer(); @@ -179,38 +208,45 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.source_filename).zpo zip_arc_member_file.expandedData = zip_data.toBytes(); zip.addMember(zip_arc_member_file); } + } else { + if (doc_matters.opt.action.verbose) { + writeln("src out NOT found (markup source): ", fn_src_in); + } } } { /+ bundle insert files +/ - if (doc_matters.file_insert_list.length > 0) { - foreach (insert_file; doc_matters.file_insert_list) { + if (doc_matters.src.file_insert_list.length > 0) { + foreach (insert_file; doc_matters.src.file_insert_list) { debug(sisupod) { writeln( insert_file, " -> ", pths_sisupod.fn_doc_insert( - doc_matters.source_filename, + doc_matters.src.filename, insert_file, - doc_matters.language, + doc_matters.src.language, ).zpod ); } auto fn_src_in = insert_file; - auto fn_src_out_sisupod_zip_base = - pths_sisupod.fn_doc_insert( - doc_matters.source_filename, + auto fn_src_out_sisupod_zip_base + = pths_sisupod.fn_doc_insert( + doc_matters.src.filename, insert_file, - doc_matters.language, + doc_matters.src.language, ).zpod.to!string; - auto fn_src_out_filesystem = - pths_sisupod.fn_doc_insert( - doc_matters.source_filename, + auto fn_src_out_filesystem + = pths_sisupod.fn_doc_insert( + doc_matters.src.filename, insert_file, - doc_matters.language, + doc_matters.src.language, ).filesystem_open_zpod.to!string; if (exists(fn_src_in)) { - if (doc_matters.opt_action.source) { + debug(io) { + writeln("src out found: ", fn_src_in); + } + if (doc_matters.opt.action.source) { fn_src_in.copy(fn_src_out_filesystem); } - if (doc_matters.opt_action.sisupod) { + if (doc_matters.opt.action.sisupod) { auto zip_arc_member_file = new ArchiveMember(); zip_arc_member_file.name = fn_src_out_sisupod_zip_base; auto zip_data = new OutBuffer(); @@ -219,13 +255,17 @@ auto fn_sisupod = pths_sisupod.sisupod_filename(doc_matters.source_filename).zpo zip.addMember(zip_arc_member_file); createZipFile!()(fn_sisupod, zip.build()); } + } else { + if (doc_matters.opt.action.verbose) { + writeln("src out NOT found (insert file): ", fn_src_in); + } } } } } { - auto fn_src_in = doc_matters.source_filename; + auto fn_src_in = doc_matters.src.filename; if (exists(fn_src_in)) { - if (doc_matters.opt_action.sisupod) { + if (doc_matters.opt.action.sisupod) { createZipFile!()(fn_sisupod, zip.build()); } } @@ -251,22 +291,22 @@ if (exists(fn_sisupod)) { catch (ZipException ex) { // Handle errors } - if (doc_matters.source_filename == "sisudoc/media/text/en/the_wealth_of_networks.yochai_benkler.sst") { + if (doc_matters.src.filename == "sisudoc/media/text/en/the_wealth_of_networks.yochai_benkler.sst") { assert( ((data).sha256Of).toHexString == "626F83A31ED82F42CF528E922C1643498A137ABA3F2E5AFF8A379EA79EA22A1E", "\nsisupod: sha256 value for " - ~ doc_matters.source_filename + ~ doc_matters.src.filename ~ " has changed, is now: " ~ ((data).sha256Of).toHexString ); } - if (doc_matters.source_filename == "sisudoc/media/text/en/sisu_markup_stress_test.sst") { + if (doc_matters.src.filename == "sisudoc/media/text/en/sisu_markup_stress_test.sst") { assert( ((data).sha256Of).toHexString == "AAE0C87AB3F6D5F7385AEEA6EE661F56D40475CFE87AD930C78C9FE07FFB0D91", "\nsisupod: sha256 value for " - ~ doc_matters.source_filename + ~ doc_matters.src.filename ~ " has changed, is now: " ~ ((data).sha256Of).toHexString ); diff --git a/org/output_sqlite.org b/org/output_sqlite.org index 6d929a6..08e4b8d 100644 --- a/org/output_sqlite.org +++ b/org/output_sqlite.org @@ -66,7 +66,7 @@ template SQLiteBuildTablesAndPopulate() { <> } } - SQLiteObjectsLoop!()(doc_matters.keys_seq.sql); + SQLiteObjectsLoop!()(doc_matters.xml.keys_seq.sql); } } template SQLiteTablesCreate() { @@ -133,7 +133,7 @@ auto generic_munge_sanitize_text_for_search( if (_urls.length > 0) { _txt ~= _urls; } - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { writeln(_txt, "\n"); } debug(sql_text_clean) { @@ -198,7 +198,7 @@ auto munge_html(O)( if (_notes.length > 0) { _txt ~= _notes; } - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { writeln(_txt, "\n"); } return _txt; @@ -466,11 +466,11 @@ auto html_table(O)( #+name: sqlite_db_initialize #+BEGIN_SRC d -auto pth_sqlite = SiSUpathsSQLite!()(doc_matters.output_path, doc_matters.language); -auto db = Database(pth_sqlite.sqlite_file(doc_matters.environment.pwd.baseName)); +auto pth_sqlite = SiSUpathsSQLite!()(doc_matters.output_path, doc_matters.src.language); +auto db = Database(pth_sqlite.sqlite_file(doc_matters.env.pwd.baseName)); // auto db = Database(":memory:"); // open database in memory -if (doc_matters.opt_action.sqlite_create) { - if ((doc_matters.opt_action.verbose)) { writeln("sqlite create tables... "); } +if (doc_matters.opt.action.sqlite_create) { + if ((doc_matters.opt.action.verbose)) { writeln("sqlite create tables... "); } db.run(" #+END_SRC @@ -1099,7 +1099,7 @@ auto heading(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_heading(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1124,7 +1124,7 @@ auto para(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_para(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1149,7 +1149,7 @@ auto quote(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_quote(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1173,7 +1173,7 @@ auto group(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_group(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1198,7 +1198,7 @@ auto block(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_block(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1223,7 +1223,7 @@ auto verse(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_verse(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1248,7 +1248,7 @@ auto code(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_code(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1273,7 +1273,7 @@ auto table(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_table(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1306,14 +1306,14 @@ foreach (part; doc_parts) { obj_txt = format_and_sqlite_load.heading(obj); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1335,7 +1335,7 @@ foreach (part; doc_parts) { obj_txt = format_and_sqlite_load.para(obj); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; @@ -1364,14 +1364,14 @@ foreach (part; doc_parts) { obj_txt = format_and_sqlite_load.table(obj); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1401,14 +1401,14 @@ foreach (part; doc_parts) { obj_txt = format_and_sqlite_load.para(obj); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1417,7 +1417,7 @@ foreach (part; doc_parts) { case "comment": break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from diff --git a/org/output_sqlite_discrete.org b/org/output_sqlite_discrete.org index 056e691..abcb5b3 100644 --- a/org/output_sqlite_discrete.org +++ b/org/output_sqlite_discrete.org @@ -66,7 +66,7 @@ template SQLiteDiscreteBuildTablesAndPopulate() { <> } } - SQLiteObjectsLoop!()(doc_matters.keys_seq.sql); + SQLiteObjectsLoop!()(doc_matters.xml.keys_seq.sql); } } template SQLiteDiscreteTablesCreate() { @@ -133,7 +133,7 @@ auto generic_munge_sanitize_text_for_search( if (_urls.length > 0) { _txt ~= _urls; } - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { writeln(_txt, "\n"); } debug(sql_text_clean) { @@ -198,7 +198,7 @@ auto munge_html(O)( if (_notes.length > 0) { _txt ~= _notes; } - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { writeln(_txt, "\n"); } return _txt; @@ -466,8 +466,8 @@ auto html_table(O)( #+name: sqlite_db_initialize #+BEGIN_SRC d -auto pth_sqlite = SiSUpathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.language); -auto db = Database(pth_sqlite.sqlite_file(doc_matters.source_filename)); +auto pth_sqlite = SiSUpathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); +auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename)); // auto db = Database(":memory:"); // open database in memory db.run(" #+END_SRC @@ -1067,7 +1067,7 @@ auto heading(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_heading(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1092,7 +1092,7 @@ auto para(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_para(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1117,7 +1117,7 @@ auto quote(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_quote(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1141,7 +1141,7 @@ auto group(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_group(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1166,7 +1166,7 @@ auto block(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_block(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1191,7 +1191,7 @@ auto verse(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_verse(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1216,7 +1216,7 @@ auto code(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_code(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1241,7 +1241,7 @@ auto table(O)( "text": generic_munge_sanitize_text_for_search(obj.text), "html": html_table(obj) ]; - if (doc_matters.opt_action.debug_do) { + if (doc_matters.opt.action.debug_do) { debug(sql_txt) { writeln(obj_txt["text"]); } @@ -1274,14 +1274,14 @@ foreach (part; doc_parts) { obj_txt = format_and_sqlite_load.heading(obj); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1303,7 +1303,7 @@ foreach (part; doc_parts) { obj_txt = format_and_sqlite_load.para(obj); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; @@ -1332,14 +1332,14 @@ foreach (part; doc_parts) { obj_txt = format_and_sqlite_load.table(obj); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1369,14 +1369,14 @@ foreach (part; doc_parts) { obj_txt = format_and_sqlite_load.para(obj); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1385,7 +1385,7 @@ foreach (part; doc_parts) { case "comment": break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from diff --git a/org/output_xmls.org b/org/output_xmls.org index c73b42c..19f8552 100644 --- a/org/output_xmls.org +++ b/org/output_xmls.org @@ -16,6 +16,7 @@ [[./sdp.org][sdp]] [[./][org/]] [[./output_hub.org][output_hub]] + * xml offspring (xhtml html epub) :module:sdp:output_xmls: ** format xhtml objects :format: *** 0. module template @@ -332,7 +333,7 @@ auto html_head(Dm)( ((type == "seg") ? "../../../css/html_seg.css" : "../../css/html_scroll.css"), - doc_matters.language, + doc_matters.src.language, site_info_button(doc_matters), inline_search_form(doc_matters), ((type == "seg") ? "" : "\n"), @@ -356,16 +357,16 @@ auto epub3_seg_head(Dm)( xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="%s" xml:lang="%s">¶", - doc_matters.language, - doc_matters.language, + doc_matters.src.language, + doc_matters.src.language, ); string html_strict = format(q"¶ ¶", - doc_matters.language, - doc_matters.language, + doc_matters.src.language, + doc_matters.src.language, ); string o; o = format(q"¶%s @@ -399,7 +400,7 @@ auto epub3_seg_head(Dm)( 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, + doc_matters.src.language, ); return o; } @@ -1327,7 +1328,7 @@ void scroll(D,I)( string suffix = ".html"; string previous_part = ""; string delimit = ""; - foreach (part; doc_matters.keys_seq.scroll) { + foreach (part; doc_matters.xml.keys_seq.scroll) { foreach (obj; doc_abstraction[part]) { delimit = xhtml_format.div_delimit(part, previous_part); string _txt = xhtml_format.special_characters(obj, obj.text); @@ -1343,14 +1344,14 @@ void scroll(D,I)( doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1367,7 +1368,7 @@ void scroll(D,I)( doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; @@ -1396,14 +1397,14 @@ void scroll(D,I)( doc_html ~= xhtml_format.table(obj, _txt); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1433,14 +1434,14 @@ void scroll(D,I)( doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1449,7 +1450,7 @@ void scroll(D,I)( case "comment": break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -1474,12 +1475,12 @@ void scroll_write_output(M,C)( debug(asserts) { static assert(is(typeof(doc) == string[])); } - auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.language); + auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { if (!exists(pth_html.base)) { pth_html.base.mkdirRecurse; } - auto f = File(pth_html.fn_scroll(doc_matters.source_filename), "w"); + auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); foreach (o; doc) { f.writeln(o); } @@ -1487,7 +1488,7 @@ void scroll_write_output(M,C)( catch (ErrnoException ex) { // Handle error } - writeln(" ", pth_html.fn_scroll(doc_matters.source_filename)); + writeln(" ", pth_html.fn_scroll(doc_matters.src.filename)); } #+END_SRC @@ -1512,7 +1513,7 @@ void seg(D,I)( string suffix = ".html"; string previous_part = ""; string delimit = ""; - foreach (part; doc_matters.keys_seq.seg) { + foreach (part; doc_matters.xml.keys_seq.seg) { foreach (obj; doc_abstraction[part]) { delimit = xhtml_format.div_delimit(part, previous_part); string _txt = xhtml_format.special_characters(obj, obj.text); @@ -1567,13 +1568,13 @@ void seg(D,I)( doc_html_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup); } break; @@ -1590,14 +1591,14 @@ void seg(D,I)( doc_html[segment_filename] ~= to!string(t[0]); break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; @@ -1613,7 +1614,7 @@ void seg(D,I)( doc_html_endnotes[segment_filename] ~= t[1]; break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; @@ -1651,14 +1652,14 @@ void seg(D,I)( doc_html_endnotes[segment_filename] ~= ""; break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1694,14 +1695,14 @@ void seg(D,I)( doc_html_endnotes[segment_filename] ~= t[1]; break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); } break; } break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); } break; @@ -1710,7 +1711,7 @@ void seg(D,I)( case "comment": break; default: - if ((doc_matters.opt_action.debug_do)) { + if ((doc_matters.opt.action.debug_do)) { writeln(__FILE__, ":", __LINE__, ": ", obj.of_part); } break; @@ -1736,15 +1737,15 @@ void seg_write_output(M,D,E)( } mixin SiSUoutputRgxInit; auto rgx = Rgx(); - auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.language); + auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language); auto xhtml_format = outputXHTMLs(); - auto m = doc_matters.source_filename.matchFirst(rgx.src_fn); + auto m = doc_matters.src.filename.matchFirst(rgx.src_fn); try { - if (!exists(pth_html.seg(doc_matters.source_filename))) { - pth_html.seg(doc_matters.source_filename).mkdirRecurse; + if (!exists(pth_html.seg(doc_matters.src.filename))) { + pth_html.seg(doc_matters.src.filename).mkdirRecurse; } - foreach (seg_filename; doc_matters.segnames) { - auto f = File(pth_html.fn_seg(doc_matters.source_filename, seg_filename), "w"); + foreach (seg_filename; doc_matters.xml.segnames) { + auto f = File(pth_html.fn_seg(doc_matters.src.filename, seg_filename), "w"); foreach (docseg; doc_html[seg_filename]) { f.writeln(docseg); } @@ -1757,7 +1758,7 @@ void seg_write_output(M,D,E)( catch (ErrnoException ex) { // handle error } - writeln(" ", pth_html.fn_seg(doc_matters.source_filename, "toc")); + writeln(" ", pth_html.fn_seg(doc_matters.src.filename, "toc")); } #+END_SRC @@ -1769,7 +1770,7 @@ void css(M)( auto return ref M doc_matters, ) { auto css = SiSUcss(); - auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.language); + auto pth_html = SiSUpathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { if (!exists(pth_html.css)) { (pth_html.css).mkdirRecurse; @@ -1864,7 +1865,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> #+BEGIN_SRC d string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) { auto xhtml_format = outputXHTMLs(); - auto pth_epub3 = SiSUpathsEPUB!()(doc_matters.output_path, doc_matters.language); + auto pth_epub3 = SiSUpathsEPUB!()(doc_matters.output_path, doc_matters.src.language); string uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! string content = format(q"¶ @@ -1903,7 +1904,7 @@ string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) { ? "" : 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.src.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) @@ -1911,17 +1912,17 @@ string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) { uuid, uuid, uuid, - (pth_epub3.fn_oebps_css(doc_matters.source_filename)).chompPrefix("OEBPS/"), + (pth_epub3.fn_oebps_css(doc_matters.src.filename)).chompPrefix("OEBPS/"), ); content ~= " " ~ "" ~ "\n "; content ~= parts["manifest_documents"]; // TODO sort jpg & png content ~= " " ~ "" ~ "\n "; - foreach (image; doc_matters.image_list) { + foreach (image; doc_matters.src.image_list) { content ~= format(q"¶ ¶", image.baseName.stripExtension, - (pth_epub3.doc_oebps_image(doc_matters.source_filename)).chompPrefix("OEBPS/"), + (pth_epub3.doc_oebps_image(doc_matters.src.filename)).chompPrefix("OEBPS/"), image, image.extension.chompPrefix("."), ); @@ -1935,7 +1936,7 @@ string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) { content ~= " " ~ "" ~ "\n "; content ~= "" ~ ""; debug(epubmanifest) { - foreach (s; doc_matters.keys_seq.seg) { + foreach (s; doc_matters.xml.keys_seq.seg) { foreach (obj; doc_abstraction[s]) { if (obj.is_a == "heading") { if (obj.heading_lev_markup == 4) { @@ -1985,7 +1986,7 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) {